Package org.openiam.srvc.am
Class OAuthWebServiceImpl
- java.lang.Object
-
- org.openiam.srvc.AbstractApiService
-
- org.openiam.srvc.am.OAuthWebServiceImpl
-
- All Implemented Interfaces:
OAuthWebService
@Service("OAuthWS") @DependsOn("springContextProvider") public class OAuthWebServiceImpl extends AbstractApiService implements OAuthWebService
Created by alexander on 06/07/15.
-
-
Field Summary
-
Fields inherited from class org.openiam.srvc.AbstractApiService
applicationContext, log, rabbitMQSender
-
-
Constructor Summary
Constructors Constructor Description OAuthWebServiceImpl(OAuthQueue queue)
-
Method Summary
-
Methods inherited from class org.openiam.srvc.AbstractApiService
broadcast, crudRequest, getBooleanValue, getIntValue, getIntValue, getRabbitMqQueue, getResponse, getResponse, getValue, getValue, getValueList, getValueList, idRequest, manageApiRequest, manageApiRequest, manageCrudApiRequest, manageCrudApiRequest, manageCrudApiRequest, manageCrudApiRequest, membershipRequestProcessing, membershipRequestProcessing, publish, publish, sendAsync, sendAsync
-
-
-
-
Constructor Detail
-
OAuthWebServiceImpl
@Autowired public OAuthWebServiceImpl(OAuthQueue queue)
-
-
Method Detail
-
getOAuthTokens
public List<OAuthToken> getOAuthTokens(String userId)
Description copied from interface:OAuthWebService
Get oauth tokens related to user with given user id- Specified by:
getOAuthTokens
in interfaceOAuthWebService
- Returns:
- List <
OAuthToken
> - See Also:
OAuthToken
-
getClient
public AuthProvider getClient(String clientId)
- Specified by:
getClient
in interfaceOAuthWebService
-
getAuthorizedScopes
public List<Resource> getAuthorizedScopes(String clientId, OAuthToken oAuthToken)
- Specified by:
getAuthorizedScopes
in interfaceOAuthWebService
-
saveClientScopeAuthorization
public Response saveClientScopeAuthorization(String providerId, String userId, List<OAuthUserClientXref> oauthUserClientXrefList)
- Specified by:
saveClientScopeAuthorization
in interfaceOAuthWebService
-
saveOAuthCode
public Response saveOAuthCode(OAuthCode oAuthCode)
- Specified by:
saveOAuthCode
in interfaceOAuthWebService
-
getOAuthCode
public OAuthCode getOAuthCode(String code)
- Specified by:
getOAuthCode
in interfaceOAuthWebService
-
getOAuthToken
public OAuthToken getOAuthToken(String token)
- Specified by:
getOAuthToken
in interfaceOAuthWebService
-
getOAuthTokenByRefreshToken
public OAuthToken getOAuthTokenByRefreshToken(String refreshToken)
- Specified by:
getOAuthTokenByRefreshToken
in interfaceOAuthWebService
-
saveOAuthToken
public Response saveOAuthToken(OAuthToken oAuthToken)
- Specified by:
saveOAuthToken
in interfaceOAuthWebService
-
deAuthorizeClient
public Response deAuthorizeClient(String clientId, String userId)
- Specified by:
deAuthorizeClient
in interfaceOAuthWebService
-
revokeTokens
public Response revokeTokens(List<String> tokens) throws BasicDataServiceException
Description copied from interface:OAuthWebService
Revoke token.- Specified by:
revokeTokens
in interfaceOAuthWebService
- Parameters:
tokens
- if null throwsBasicDataServiceException
withResponseCode
.INVALID_TOKEN- Throws:
BasicDataServiceException
-
getAuthorizedScopesForRequest
public OAuthScopesResponse getAuthorizedScopesForRequest(String clientId, String userId, boolean countNumAuthorizedScopes, boolean internationalizeScopes)
- Specified by:
getAuthorizedScopesForRequest
in interfaceOAuthWebService
-
getAuthorizedScopesRFC6749
public OAuthScopesResponse getAuthorizedScopesRFC6749(String clientId, String userId, String userRequestedScopes, boolean countNumAuthorizedScopes, boolean internationalizeScopes)
- Specified by:
getAuthorizedScopesRFC6749
in interfaceOAuthWebService
-
revokeIdTokens
public Response revokeIdTokens(List<String> idTokens) throws BasicDataServiceException
Revoke ID tokens.- Specified by:
revokeIdTokens
in interfaceOAuthWebService
- Parameters:
idTokens
- List of ID tokens to be revoked. If null, throwsBasicDataServiceException
- Returns:
- Response indicating the result of the revocation process.
- Throws:
BasicDataServiceException
- If an error occurs while revoking tokens.
-
-