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

Function NewContextUserManager

httpserver/identity.go:21–26  ·  view source on GitHub ↗
(contextKey string, identityRepo identity.IdentityRepo)

Source from the content-addressed store, hash-verified

19}
20
21func NewContextUserManager(contextKey string, identityRepo identity.IdentityRepo) *HttpContextUserManager {
22 return &HttpContextUserManager{
23 contextKey: authContextKey(contextKey),
24 identityRepo: identityRepo,
25 }
26}
27
28func (cu *HttpContextUserManager) GetAuthenticationInfo(c context.Context) *identity.AuthenticationInfo {
29 v, ok := c.Value(cu.contextKey).(*identity.AuthenticationInfo)

Callers 3

TestLoginLogoutFunction · 0.92
NewIdentityManagerFunction · 0.85

Calls 1

authContextKeyTypeAlias · 0.85

Tested by 2

TestLoginLogoutFunction · 0.74