MCPcopy
hub / github.com/tinode/chat / AuthAddRecord

Method AuthAddRecord

server/db/adapter.go:87–87  ·  view source on GitHub ↗

AuthAddRecord creates new authentication record

(user t.Uid, scheme, unique string, authLvl auth.Level, secret []byte, expires time.Time)

Source from the content-addressed store, hash-verified

85 AuthGetRecord(user t.Uid, scheme string) (string, auth.Level, []byte, time.Time, error)
86 // AuthAddRecord creates new authentication record
87 AuthAddRecord(user t.Uid, scheme, unique string, authLvl auth.Level, secret []byte, expires time.Time) error
88 // AuthDelScheme deletes an existing authentication scheme for the user.
89 AuthDelScheme(user t.Uid, scheme string) error
90 // AuthDelAllRecords deletes all records of a given user.

Callers 5

AddAuthRecordMethod · 0.65
TestAuthAddRecordFunction · 0.65
TestAuthAddRecordFunction · 0.65
TestAuthAddRecordFunction · 0.65
TestAuthAddRecordFunction · 0.65

Implementers 4

adapterserver/db/mongodb/adapter.go
adapterserver/db/postgres/adapter.go
adapterserver/db/rethinkdb/adapter.go
adapterserver/db/mysql/adapter.go

Calls

no outgoing calls

Tested by 4

TestAuthAddRecordFunction · 0.52
TestAuthAddRecordFunction · 0.52
TestAuthAddRecordFunction · 0.52
TestAuthAddRecordFunction · 0.52