(ctx context.Context)
| 119 | } |
| 120 | |
| 121 | func principalFromContext(ctx context.Context) *identity.Principal { |
| 122 | if p, ok := ctx.Value(principalCtxKey{}).(*identity.Principal); ok { |
| 123 | return p |
| 124 | } |
| 125 | return nil |
| 126 | } |
| 127 | |
| 128 | func userFromContext(ctx context.Context) *identity.User { |
| 129 | if p := principalFromContext(ctx); p != nil { |
no outgoing calls
no test coverage detected