Search in sources :

Example 16 with UnauthorizedClientException

use of org.forgerock.oauth2.core.exceptions.UnauthorizedClientException in project OpenAM by OpenRock.

the class CheckSessionImpl method getClientSessionURI.

/**
     * {@inheritDoc}
     */
public String getClientSessionURI(HttpServletRequest request) throws UnauthorizedClientException, InvalidClientException, NotFoundException {
    SignedJwt jwt = getIDToken(request);
    if (jwt == null) {
        return "";
    }
    final ClientRegistration clientRegistration = getClientRegistration(jwt);
    if (clientRegistration != null && !isJwtValid(jwt, clientRegistration)) {
        return "";
    }
    return clientRegistration.getClientSessionURI();
}
Also used : ClientRegistration(org.forgerock.oauth2.core.ClientRegistration) SignedJwt(org.forgerock.json.jose.jws.SignedJwt)

Aggregations

UnauthorizedClientException (org.forgerock.oauth2.core.exceptions.UnauthorizedClientException)14 AMIdentity (com.sun.identity.idm.AMIdentity)10 SSOException (com.iplanet.sso.SSOException)8 IdRepoException (com.sun.identity.idm.IdRepoException)7 SSOToken (com.iplanet.sso.SSOToken)5 HashSet (java.util.HashSet)5 Set (java.util.Set)5 JsonValue (org.forgerock.json.JsonValue)5 AMIdentityRepository (com.sun.identity.idm.AMIdentityRepository)4 IdSearchControl (com.sun.identity.idm.IdSearchControl)4 IdSearchResults (com.sun.identity.idm.IdSearchResults)4 HashMap (java.util.HashMap)4 NotFoundException (org.forgerock.json.resource.NotFoundException)3 PermanentException (org.forgerock.json.resource.PermanentException)3 ResourceException (org.forgerock.json.resource.ResourceException)3 CoreTokenException (org.forgerock.openam.cts.exceptions.CoreTokenException)3 JSONObject (org.json.JSONObject)3 Locale (java.util.Locale)2 Map (java.util.Map)2 ServiceUnavailableException (org.forgerock.json.resource.ServiceUnavailableException)2