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