MCPcopy Index your code
hub / github.com/tinode/chat / Authenticate

Method Authenticate

server/auth/auth.go:254–254  ·  view source on GitHub ↗

Authenticate: given a user-provided authentication secret (such as "login:password"), either return user's record (ID, time when the secret expires, etc), or issue a challenge to continue the authentication process to the next step, or return an error code. The remoteAddr (i.e. the IP address of the

(secret []byte, remoteAddr string)

Source from the content-addressed store, hash-verified

252 // store.Users.GetAuthRecord("scheme", "unique")
253 // Returns: user auth record, challenge, error.
254 Authenticate(secret []byte, remoteAddr string) (*Rec, []byte, error)
255
256 // AsTag converts search token into prefixed tag or an empty string if it
257 // cannot be represented as a prefixed tag.

Callers 4

TestDispatchLoginFunction · 0.65
accMethod · 0.65
loginMethod · 0.65
authFileRequestFunction · 0.65

Implementers 7

authenticatorserver/auth/anon/auth_anon.go
authenticatorserver/auth/token/auth_token.go
MockAuthHandlerserver/auth/mock_auth/mock_auth.go
MockAuthHandlerMockRecorderserver/auth/mock_auth/mock_auth.go
authenticatorserver/auth/basic/auth_basic.go
authenticatorserver/auth/rest/auth_rest.go
authenticatorserver/auth/code/auth_code.go

Calls

no outgoing calls

Tested by 1

TestDispatchLoginFunction · 0.52