Searched refs:accessToken (Results 1 - 25 of 91) sorted by relevance

1234

/forgerock/openam-v13/openam-rest/src/main/java/org/forgerock/openam/rest/audit/
H A DOAuth2AuditOAuth2TokenContextProvider.java30 protected String getTrackingIdFromToken(JsonValue accessToken) { argument
31 return getAccessTokenProperty(OAuth2Constants.CoreTokenParams.AUDIT_TRACKING_ID, accessToken);
34 protected String getAccessTokenProperty(String propertyName, JsonValue accessToken) { argument
35 if (!accessToken.isDefined(propertyName)) {
39 if (accessToken.get(propertyName).isCollection()) {
40 return (String) accessToken.get(propertyName).asList().get(0);
43 if (accessToken.get(propertyName).isString()) {
44 accessToken.get(propertyName).toString(); // TODO: Return this value?
50 protected String getUserIdFromToken(JsonValue accessToken) { argument
51 String username = getAccessTokenProperty(OAuth2Constants.CoreTokenParams.USERNAME, accessToken);
[all...]
H A DOAuth2AuditAccessTokenContextProvider.java104 AccessToken accessToken = retrieveAccessTokenFromChallengeResponse(request);
105 if (accessToken != null) {
106 userId = getUserIdFromToken(accessToken);
115 AccessToken accessToken = retrieveAccessTokenFromRequest(request);
116 if (accessToken != null) {
117 userId = getUserIdFromToken(accessToken);
126 AccessToken accessToken = retrieveAccessTokenFromChallengeResponse(request);
127 if (accessToken != null) {
128 trackingId = getTrackingIdFromToken(accessToken);
137 AccessToken accessToken
[all...]
/forgerock/openam/openam-oauth2/src/main/java/org/forgerock/openidconnect/
H A DOpenIDTokenIssuer.java63 * @param accessToken The access token requested by the OAuth2 request.
71 public Map.Entry<String, String> issueToken(AccessToken accessToken, OAuth2Request request) argument
74 final Set<String> scope = accessToken.getScope();
79 request.setSession(accessToken.getSessionId());
83 final String nonce = accessToken.getNonce();
86 accessToken.getClientId(),
87 accessToken.getClientId(),
89 getOps(accessToken, request),
106 * @param accessToken The access token requested by the OAuth2 request.
110 protected String getOps(AccessToken accessToken, OAuth2Reques argument
[all...]
/forgerock/openam-v13/openam-sts/openam-soap-sts/openam-soap-sts-server/src/main/java/org/forgerock/openam/sts/soap/bootstrap/
H A DSoapSTSAccessTokenProvider.java37 * @param accessToken the accessToken returned fom getAccessToken.
39 public void invalidateAccessToken(String accessToken); argument
/forgerock/openam/openam-oauth2/src/main/java/org/forgerock/openam/oauth2/
H A DOAuth2RealmResolver.java46 AccessToken accessToken = request.getToken(AccessToken.class);
48 if (accessToken != null) {
49 realm = accessToken.getRealm();
H A DAccessTokenProtectionFilter.java69 AccessToken accessToken = tokenStore.readAccessToken(oAuth2Request, tokenId);
70 if (accessToken == null || accessToken.isExpired()) {
72 } else if (requiredScope != null && !accessToken.getScope().contains(requiredScope)) {
75 oAuth2Request.setToken(AccessToken.class, accessToken);
/forgerock/openam-v13/openam-oauth2-common/openid-connect-core/src/main/java/org/forgerock/openidconnect/
H A DOpenIDTokenIssuer.java64 * @param accessToken The access token requested by the OAuth2 request.
72 public Map.Entry<String, String> issueToken(AccessToken accessToken, OAuth2Request request) argument
75 final Set<String> scope = accessToken.getScope();
80 request.setSession(accessToken.getSessionId());
84 final String nonce = accessToken.getNonce();
87 accessToken.getClientId(),
88 accessToken.getClientId(),
90 getOps(accessToken, request),
111 * @param accessToken The access token requested by the OAuth2 request.
115 protected String getOps(AccessToken accessToken, OAuth2Reques argument
[all...]
/forgerock/openam/openam-sts/openam-soap-sts/openam-soap-sts-server/src/main/java/org/forgerock/openam/sts/soap/bootstrap/
H A DSoapSTSAccessTokenProvider.java37 * @param accessToken the accessToken returned fom getAccessToken.
39 public void invalidateAccessToken(String accessToken); argument
43 * @param accessToken the accessToken returned fom getAccessToken.
/forgerock/openam-v13/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/
H A DOAuth2PostAuthnPlugin.java101 String accessToken = ssoToken.getProperty(SESSION_OAUTH_TOKEN);
103 OAuthUtil.debugMessage("OAuth2PostAuthnPlugin: OAUTH2 Token is: " + accessToken);
109 if (accessToken != null && !accessToken.isEmpty()) {
119 if (accessToken.contains("\\|")) {
121 String[] tokenParts = accessToken.split("\\|");
129 PARAM_ACCESS_TOKEN +"=" + accessToken;
/forgerock/openam/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/
H A DOAuth2PostAuthnPlugin.java101 String accessToken = ssoToken.getProperty(SESSION_OAUTH_TOKEN);
103 OAuthUtil.debugMessage("OAuth2PostAuthnPlugin: OAUTH2 Token is: " + accessToken);
109 if (accessToken != null && !accessToken.isEmpty()) {
119 if (accessToken.contains("\\|")) {
121 String[] tokenParts = accessToken.split("\\|");
129 PARAM_ACCESS_TOKEN +"=" + accessToken;
/forgerock/openam-v13/openam-oauth2-common/oauth2-core/src/test/java/org/forgerock/oauth2/core/
H A DClientCredentialsGrantTypeHandlerTest.java80 AccessToken accessToken = mock(AccessToken.class);
89 .willReturn(accessToken);
96 verify(providerSettings).additionalDataToReturnFromTokenEndpoint(accessToken, request);
97 verify(accessToken, never()).addExtraData(eq("scope"), anyString());
98 assertEquals(actualAccessToken, accessToken);
108 AccessToken accessToken = mock(AccessToken.class);
117 .willReturn(accessToken);
124 verify(providerSettings).additionalDataToReturnFromTokenEndpoint(accessToken, request);
125 verify(accessToken).addExtraData(eq("scope"), anyString());
126 assertEquals(actualAccessToken, accessToken);
[all...]
H A DPasswordCredentialsGrantTypeHandlerTest.java78 AccessToken accessToken = mock(AccessToken.class);
90 .willReturn(accessToken);
97 verify(providerSettings).additionalDataToReturnFromTokenEndpoint(accessToken, request);
98 verify(accessToken, never()).addExtraData(eq("refresh_token"), anyString());
99 verify(accessToken, never()).addExtraData(eq("scope"), anyString());
100 assertEquals(actualAccessToken, accessToken);
131 AccessToken accessToken = mock(AccessToken.class);
146 .willReturn(accessToken);
153 verify(providerSettings).additionalDataToReturnFromTokenEndpoint(accessToken, request);
154 verify(accessToken)
[all...]
H A DAuthorizationCodeGrantTypeHandlerTest.java204 AccessToken accessToken = mock(AccessToken.class);
221 .willReturn(accessToken);
232 verify(accessToken).addExtraData(eq("refresh_token"), anyString());
233 verify(accessToken).addExtraData(eq("nonce"), anyString());
234 verify(providerSettings).additionalDataToReturnFromTokenEndpoint(accessToken, request);
235 verify(accessToken, never()).addExtraData(eq("scope"), anyString());
236 assertEquals(actualAccessToken, accessToken);
247 AccessToken accessToken = mock(AccessToken.class);
262 .willReturn(accessToken);
273 verify(accessToken, neve
[all...]
/forgerock/openam-v13/openam-oauth2/src/main/java/org/forgerock/openam/openidconnect/
H A DOpenAMOpenIdTokenIssuer.java54 protected String getOps(AccessToken accessToken, OAuth2Request request) { argument
55 return accessToken.getSessionId();
/forgerock/openam/openam-oauth2/src/main/java/org/forgerock/oauth2/core/
H A DTokenInfoService.java94 final AccessToken accessToken = request.getToken(AccessToken.class);
97 request.<Request>getRequest().getAttributes().put(OAuth2Constants.Custom.REALM, accessToken.getRealm());
98 assertTokenClientExists(accessToken, request);
100 logger.trace("In Validator resource - got token = " + accessToken);
104 final Map<String, Object> scopeEvaluation = providerSettings.evaluateScope(accessToken);
105 response.putAll(accessToken.getTokenInfo());
134 private void assertTokenClientExists(AccessToken accessToken, OAuth2Request request) throws InvalidTokenException { argument
135 String clientId = accessToken.getClientId();
H A DAccessTokenVerifier.java77 final AccessToken accessToken = tokenStore.readAccessToken(request, tokenId);
79 if (accessToken != null) {
80 return accessToken.isExpired() ? INVALID_TOKEN : new TokenState(tokenId);
H A DClientCredentialsGrantTypeHandler.java86 final AccessToken accessToken = tokenStore.createAccessToken(grantType, BEARER, null,
90 providerSettings.additionalDataToReturnFromTokenEndpoint(accessToken, request);
93 accessToken.addExtraData(SCOPE, Utils.joinScope(validatedScope));
96 tokenStore.updateAccessToken(request, accessToken);
98 return accessToken;
H A DJwtBearerGrantTypeHandler.java82 final AccessToken accessToken = tokenStore.createAccessToken(grantType, BEARER, null,
86 providerSettings.additionalDataToReturnFromTokenEndpoint(accessToken, request);
89 accessToken.addExtraData(SCOPE, joinScope(authorizationScope));
92 tokenStore.updateAccessToken(request, accessToken);
94 return accessToken;
/forgerock/openam-v13/openam-oauth2/src/main/java/org/forgerock/openam/oauth2/provider/
H A DResponseType.java51 public CoreToken createToken(Token accessToken, Map<String, Object> data) throws NotFoundException; argument
/forgerock/openam-v13/openam-oauth2-common/oauth2-core/src/main/java/org/forgerock/oauth2/core/
H A DAccessTokenVerifier.java77 final AccessToken accessToken = tokenStore.readAccessToken(request, tokenId);
79 if (accessToken != null) {
80 return accessToken.isExpired() ? INVALID_TOKEN : new TokenState(tokenId);
H A DGrantTypeAccessTokenGenerator.java47 AccessToken accessToken = tokenStore.createAccessToken(grantType, OAuth2Constants.Bearer.BEARER,
52 accessToken.addExtraData(OAuth2Constants.Params.REFRESH_TOKEN, refreshToken.getTokenId());
55 return accessToken;
H A DClientCredentialsGrantTypeHandler.java80 final AccessToken accessToken = tokenStore.createAccessToken(grantType, BEARER, null,
84 providerSettings.additionalDataToReturnFromTokenEndpoint(accessToken, request);
87 accessToken.addExtraData(SCOPE, Utils.joinScope(validatedScope));
90 tokenStore.updateAccessToken(accessToken);
92 return accessToken;
H A DJwtBearerGrantTypeHandler.java81 final AccessToken accessToken = tokenStore.createAccessToken(grantType, BEARER, null,
85 providerSettings.additionalDataToReturnFromTokenEndpoint(accessToken, request);
88 accessToken.addExtraData(SCOPE, joinScope(authorizationScope));
91 tokenStore.updateAccessToken(accessToken);
93 return accessToken;
/forgerock/openam/openam-oauth2/src/test/java/org/forgerock/oauth2/core/
H A DAuthorizationCodeGrantTypeHandlerTest.java204 AccessToken accessToken = mock(AccessToken.class);
221 .willReturn(accessToken);
232 verify(accessToken).addExtraData(eq("refresh_token"), anyString());
233 verify(accessToken).addExtraData(eq("nonce"), anyString());
234 verify(providerSettings).additionalDataToReturnFromTokenEndpoint(accessToken, request);
235 verify(accessToken, never()).addExtraData(eq("scope"), anyString());
236 assertEquals(actualAccessToken, accessToken);
247 AccessToken accessToken = mock(AccessToken.class);
262 .willReturn(accessToken);
273 verify(accessToken, neve
[all...]
/forgerock/openam-v13/openam-oauth2-common/oauth2-restlet/src/main/java/org/forgerock/openam/oauth2/
H A DAccessTokenProtectionFilter.java69 AccessToken accessToken = tokenStore.readAccessToken(oAuth2Request, tokenId);
70 if (accessToken == null || accessToken.isExpired()) {
72 } else if (requiredScope != null && !accessToken.getScope().contains(requiredScope)) {
75 oAuth2Request.setToken(AccessToken.class, accessToken);

Completed in 2664 milliseconds

1234