Ejemplo n.º 1
0
        public OAuthConsent FetchFromAuthorizationRequest(OAuthUser oauthUser, JObject queryParameters)
        {
            var clientId = queryParameters.GetClientIdFromAuthorizationRequest();
            var scopes   = queryParameters.GetScopesFromAuthorizationRequest();
            var claims   = queryParameters.GetClaimsFromAuthorizationRequest();

            return(oauthUser.GetConsent(clientId, scopes, claims, AuthorizationRequestClaimTypes.IdToken));
        }
Ejemplo n.º 2
0
 public static bool HasOpenIDConsent(this OAuthUser user, string clientId, IEnumerable <string> scopes, IEnumerable <AuthorizationRequestClaimParameter> claims, AuthorizationRequestClaimTypes claimType = AuthorizationRequestClaimTypes.IdToken)
 {
     return(user.GetConsent(clientId, scopes, claims, claimType) != null);
 }