MCPcopy Create free account
hub / github.com/ericls/imgdd / Authenticate

Method Authenticate

httpserver/identity.go:96–100  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request, userId string, organizationUserId string)

Source from the content-addressed store, hash-verified

94}
95
96func (i *IdentityManager) Authenticate(w http.ResponseWriter, r *http.Request, userId string, organizationUserId string) {
97 i.Persister.Rotate(w, r)
98 i.Persister.Set(w, r, authenticated_user_id_session_key, userId)
99 i.Persister.Set(w, r, authroized_user_id_session_key, organizationUserId)
100}
101
102func (i *IdentityManager) Logout(w http.ResponseWriter, r *http.Request) {
103 i.Persister.Set(w, r, authenticated_user_id_session_key, "")

Callers 3

AuthenticateContextMethod · 0.95
TestLoginLogoutFunction · 0.95

Calls 2

RotateMethod · 0.65
SetMethod · 0.65

Tested by 2

TestLoginLogoutFunction · 0.76