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