Search in sources :

Example 11 with RefreshToken

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

the class OAuth2AuditRefreshTokenContextProvider method getUserIdFromRefreshTokenFromAuthorizationHeader.

private String getUserIdFromRefreshTokenFromAuthorizationHeader(Request request) {
    String userId = null;
    RefreshToken refreshToken = retrieveRefreshTokenFromChallengeResponse(request);
    if (refreshToken != null) {
        userId = getUserIdFromToken(refreshToken);
    }
    return userId;
}
Also used : RefreshToken(org.forgerock.oauth2.core.RefreshToken)

Aggregations

RefreshToken (org.forgerock.oauth2.core.RefreshToken)8 ServerException (org.forgerock.oauth2.core.exceptions.ServerException)5 OAuth2ProviderSettings (org.forgerock.oauth2.core.OAuth2ProviderSettings)3 CoreTokenException (org.forgerock.openam.cts.exceptions.CoreTokenException)3 JsonValue (org.forgerock.json.JsonValue)2 InvalidGrantException (org.forgerock.oauth2.core.exceptions.InvalidGrantException)2 OpenIdConnectClientRegistration (org.forgerock.openidconnect.OpenIdConnectClientRegistration)2 SSOException (com.iplanet.sso.SSOException)1 SMSException (com.sun.identity.sm.SMSException)1 Date (java.util.Date)1 InternalServerErrorException (org.forgerock.json.resource.InternalServerErrorException)1 NotFoundException (org.forgerock.json.resource.NotFoundException)1 AccessToken (org.forgerock.oauth2.core.AccessToken)1 AuthorizationCode (org.forgerock.oauth2.core.AuthorizationCode)1 OAuth2Request (org.forgerock.oauth2.core.OAuth2Request)1 ClientAuthenticationFailureFactory (org.forgerock.oauth2.core.exceptions.ClientAuthenticationFailureFactory)1 InvalidClientException (org.forgerock.oauth2.core.exceptions.InvalidClientException)1 NotFoundException (org.forgerock.oauth2.core.exceptions.NotFoundException)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1 ChallengeResponse (org.restlet.data.ChallengeResponse)1