func GetAuthenticatedClaimsCtx(ctx domain.IContext, r *http.Request) ITokenClaims { if claim := ctx.Get(r, TokenClaimsKey); claim != nil { return claim.(ITokenClaims) } return nil }
func GetTokenAuthorityCtx(ctx domain.IContext, r *http.Request) ITokenAuthority { if ta := ctx.Get(r, TokenAuthorityKey); ta != nil { return ta.(ITokenAuthority) } return nil }