Package org.openiam.esb.am.service.impl
Class AuthProviderServiceImpl
- java.lang.Object
-
- org.openiam.esb.am.service.impl.AuthProviderServiceImpl
-
- All Implemented Interfaces:
AuthProviderService
@Service("authProviderService") public class AuthProviderServiceImpl extends Object implements AuthProviderService
-
-
Constructor Summary
Constructors Constructor Description AuthProviderServiceImpl()
-
Method Summary
-
-
-
Method Detail
-
getAuthProviderType
@Transactional(readOnly=true) public AuthProviderType getAuthProviderType(String providerType) throws BasicDataServiceException
- Specified by:
getAuthProviderType
in interfaceAuthProviderService
- Throws:
BasicDataServiceException
-
getAuthProviderTypeList
@Transactional(readOnly=true) public List<AuthProviderType> getAuthProviderTypeList()
- Specified by:
getAuthProviderTypeList
in interfaceAuthProviderService
-
getSocialAuthProviderTypeList
@Transactional(readOnly=true) public List<AuthProviderType> getSocialAuthProviderTypeList()
- Specified by:
getSocialAuthProviderTypeList
in interfaceAuthProviderService
-
addProviderType
@Transactional public void addProviderType(AuthProviderType providerType) throws BasicDataServiceException
- Specified by:
addProviderType
in interfaceAuthProviderService
- Throws:
BasicDataServiceException
-
findAuthAttributeBeans
@Transactional(readOnly=true) public List<AuthAttribute> findAuthAttributeBeans(AuthAttributeSearchBean searchBean, int from, int size)
- Specified by:
findAuthAttributeBeans
in interfaceAuthProviderService
-
findAuthProviderBeans
@Transactional(readOnly=true) public org.springframework.data.domain.Page<AuthProvider> findAuthProviderBeans(AuthProviderSearchBean searchBean, int from, int size)
- Specified by:
findAuthProviderBeans
in interfaceAuthProviderService
-
saveAuthProvider
@Transactional public String saveAuthProvider(AuthProvider provider, String requesterId) throws BasicDataServiceException
- Specified by:
saveAuthProvider
in interfaceAuthProviderService
- Throws:
BasicDataServiceException
-
deleteAuthProvider
@Transactional public void deleteAuthProvider(String providerId) throws BasicDataServiceException
- Specified by:
deleteAuthProvider
in interfaceAuthProviderService
- Throws:
BasicDataServiceException
-
getAuthProvider
@Transactional(readOnly=true) public AuthProviderEntity getAuthProvider(String id)
- Specified by:
getAuthProvider
in interfaceAuthProviderService
-
getProvider
@Transactional(readOnly=true) public AuthProvider getProvider(String id)
- Specified by:
getProvider
in interfaceAuthProviderService
-
getOAuthClient
@Transactional(readOnly=true) public AuthProvider getOAuthClient(String clientId)
- Specified by:
getOAuthClient
in interfaceAuthProviderService
-
getAuthorizedScopes
@Transactional public List<Resource> getAuthorizedScopes(String clientId, OAuthToken token)
- Specified by:
getAuthorizedScopes
in interfaceAuthProviderService
-
saveClientScopeAuthorization
@Transactional public void saveClientScopeAuthorization(String providerId, String userId, List<OAuthUserClientXref> oauthUserClientXrefList) throws BasicDataServiceException
- Specified by:
saveClientScopeAuthorization
in interfaceAuthProviderService
- Throws:
BasicDataServiceException
-
saveOAuthCode
@Transactional public void saveOAuthCode(OAuthCode oAuthCode)
- Specified by:
saveOAuthCode
in interfaceAuthProviderService
-
getOAuthCode
@Transactional public OAuthCode getOAuthCode(String code)
- Specified by:
getOAuthCode
in interfaceAuthProviderService
-
getOAuthToken
@Transactional(readOnly=true) public OAuthToken getOAuthToken(String token)
- Specified by:
getOAuthToken
in interfaceAuthProviderService
-
getOAuthTokenByRefreshToken
@Transactional(readOnly=true) public OAuthToken getOAuthTokenByRefreshToken(String refreshToken)
- Specified by:
getOAuthTokenByRefreshToken
in interfaceAuthProviderService
-
saveOAuthToken
@Transactional public String saveOAuthToken(OAuthToken oAuthToken) throws BasicDataServiceException
- Specified by:
saveOAuthToken
in interfaceAuthProviderService
- Throws:
BasicDataServiceException
-
getAuthProviderTypeForProvider
@Transactional(readOnly=true) public AuthProviderTypeEntity getAuthProviderTypeForProvider(String providerId)
- Specified by:
getAuthProviderTypeForProvider
in interfaceAuthProviderService
-
deAuthorizeClient
@Transactional public void deAuthorizeClient(String clientId, String userId)
- Specified by:
deAuthorizeClient
in interfaceAuthProviderService
-
generatePublicPrivateKeyPairForSAMLIdentityProvider
@Transactional public void generatePublicPrivateKeyPairForSAMLIdentityProvider(String authProviderId)
- Specified by:
generatePublicPrivateKeyPairForSAMLIdentityProvider
in interfaceAuthProviderService
-
main
public static void main(String[] args)
-
getAuthorizedScopes
@Transactional(readOnly=true) public OAuthScopesResponse getAuthorizedScopes(String clientId, String userId, boolean countNumAuthorizedScopes, boolean internationalizeScopes) throws BasicDataServiceException
Description copied from interface:AuthProviderService
UseAuthProviderService.getAuthorizedScopesRFC6749(String, String, String, boolean, boolean)
instead- Specified by:
getAuthorizedScopes
in interfaceAuthProviderService
- Parameters:
clientId
- - OAuth Client IDuserId
- - Current User IdcountNumAuthorizedScopes
- - Send a total number of scopesinternationalizeScopes
- - Flag says should we internationalize Response (Fetch from Language Mapping)- Returns:
OAuthScopesResponse
- Throws:
BasicDataServiceException
- in case of problems
-
getAuthorizedScopesRFC6749
@Transactional(readOnly=true) public OAuthScopesResponse getAuthorizedScopesRFC6749(String clientId, String userId, String requestedScopes, boolean countNumAuthorizedScopes, boolean internationalizeScopes) throws BasicDataServiceException
Description copied from interface:AuthProviderService
Return User's Authorized scopes- Specified by:
getAuthorizedScopesRFC6749
in interfaceAuthProviderService
- Parameters:
clientId
- - OAuth Client IDuserId
- - Current User IdrequestedScopes
- - The scopes requested in the Authorization Request as it is (space-separated String)countNumAuthorizedScopes
- - Send a total number of scopesinternationalizeScopes
- - Flag says should we internationalize Response (Fetch from Language Mapping)- Returns:
OAuthScopesResponse
- Throws:
BasicDataServiceException
- in case of problems
-
-