protected void setRegistryService(RegistryService registryService) { if (log.isDebugEnabled()) { log.debug("RegistryService set in Identity OAuth bundle"); } OAuthComponentServiceHolder.getInstance().setRegistryService(registryService); }
protected void setRealmService(RealmService realmService) { if (log.isDebugEnabled()) { log.debug("Setting the Realm Service"); } OAuthComponentServiceHolder.getInstance().setRealmService(realmService); }
@Reference( name = "registry.service", service = RegistryService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = "unsetRegistryService" ) protected void setRegistryService(RegistryService registryService) { if (log.isDebugEnabled()) { log.debug("RegistryService set in Identity OAuth bundle"); } OAuthComponentServiceHolder.getInstance().setRegistryService(registryService); }
@Reference( name = "realm.service", service = RealmService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = "unsetRealmService" ) protected void setRealmService(RealmService realmService) { if (log.isDebugEnabled()) { log.debug("Setting the Realm Service"); } OAuthComponentServiceHolder.getInstance().setRealmService(realmService); }
protected void unsetRealmService(RealmService realmService) { if (log.isDebugEnabled()) { log.debug("Unsetting the Realm Service"); } OAuthComponentServiceHolder.getInstance().setRealmService(null); }
protected void unsetRegistryService(RegistryService registryService) { if (log.isDebugEnabled()) { log.debug("RegistryService unset in Identity OAuth bundle"); } OAuthComponentServiceHolder.getInstance().setRegistryService(null); }
protected void unsetRealmService(RealmService realmService) { if (log.isDebugEnabled()) { log.debug("Unsetting the Realm Service"); } OAuthComponentServiceHolder.getInstance().setRealmService(null); }
protected void unsetRegistryService(RegistryService registryService) { if (log.isDebugEnabled()) { log.debug("RegistryService unset in Identity OAuth bundle"); } OAuthComponentServiceHolder.getInstance().setRegistryService(null); }
private void triggerPostValidationListeners(OAuth2TokenValidationRequestDTO requestDTO, OAuth2TokenValidationResponseDTO responseDTO) { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { try { Map<String, Object> paramMap = new HashMap<>(); oAuthEventInterceptorProxy.onPostTokenValidation(requestDTO, responseDTO, paramMap); } catch (IdentityOAuth2Exception e) { log.error("Oauth post validation listener failed.", e); } } }
private void invokePostRevocationListeners(OAuthRevocationRequestDTO revokeRequestDTO, OAuthRevocationResponseDTO revokeResponseDTO, AccessTokenDO accessTokenDO, RefreshTokenValidationDataDO refreshTokenDO) { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { try { Map<String, Object> paramMap = new HashMap<>(); oAuthEventInterceptorProxy.onPostTokenRevocationByClient(revokeRequestDTO, revokeResponseDTO, accessTokenDO, refreshTokenDO, paramMap); } catch (IdentityOAuth2Exception e) { log.error("Error occurred when invoking post token revoke listener ", e); } } }
private void triggerPreValidationListeners(OAuth2TokenValidationRequestDTO requestDTO) throws IdentityOAuth2Exception { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { Map<String, Object> paramMap = new HashMap<>(); oAuthEventInterceptorProxy.onPreTokenValidation(requestDTO, paramMap); } }
private void triggerPostListeners(OAuthAuthzReqMessageContext oauthAuthzMsgCtx, AccessTokenDO tokenDO, OAuth2AuthorizeRespDTO respDTO) { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { try { oAuthEventInterceptorProxy.onPostTokenIssue(oauthAuthzMsgCtx, tokenDO, respDTO); } catch (IdentityOAuth2Exception e) { log.error("Oauth post token issue listener ", e); } } }
private void triggerPostValidationListeners(OAuth2TokenValidationRequestDTO requestDTO, OAuth2TokenValidationResponseDTO responseDTO) { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { try { oAuthEventInterceptorProxy.onPostTokenValidation(requestDTO, responseDTO); } catch (IdentityOAuth2Exception e) { log.error("Oauth post validation listener failed.", e); } } }
private void triggerPreValidationListeners(OAuth2TokenValidationRequestDTO requestDTO) throws IdentityOAuth2Exception { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { oAuthEventInterceptorProxy.onPreTokenValidation(requestDTO); } }
private void triggerPreRevokeListeners(OAuthRevocationRequestDTO revokeRequestDTO) throws IdentityOAuthAdminException { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { try { Map<String, Object> paramMap = new HashMap<>(); oAuthEventInterceptorProxy.onPreTokenRevocationByResourceOwner(revokeRequestDTO, paramMap); } catch (IdentityOAuth2Exception e) { throw handleError("Error occurred with Oauth pre-revoke listener ", e); } } }
public static int getTenantId(String tenantDomain) throws IdentityOAuth2Exception { RealmService realmService = OAuthComponentServiceHolder.getInstance().getRealmService(); try { return realmService.getTenantManager().getTenantId(tenantDomain); } catch (UserStoreException e) { String error = "Error in obtaining tenant ID from tenant domain : " + tenantDomain; throw new IdentityOAuth2Exception(error, e); } }
private void triggerPreRevokeListeners(OAuthRevocationRequestDTO revokeRequestDTO) throws IdentityOAuthAdminException { OAuthEventInterceptor oAuthEventInterceptorProxy = OAuthComponentServiceHolder.getInstance() .getOAuthEventInterceptorProxy(); if (oAuthEventInterceptorProxy != null && oAuthEventInterceptorProxy.isEnabled()) { try { oAuthEventInterceptorProxy.onPreTokenRevocationByResourceOwner(revokeRequestDTO); } catch (IdentityOAuth2Exception e) { throw new IdentityOAuthAdminException("Error occurred with Oauth pre-revoke listener ", e); } } }
public static int getTenantId(String tenantDomain) throws IdentityOAuth2Exception { RealmService realmService = OAuthComponentServiceHolder.getInstance().getRealmService(); try { return realmService.getTenantManager().getTenantId(tenantDomain); } catch (UserStoreException e) { String error = "Error in obtaining tenant ID from tenant domain : " + tenantDomain; throw new IdentityOAuth2Exception(error, e); } }
public static String getTenantDomain(int tenantId) throws IdentityOAuth2Exception { RealmService realmService = OAuthComponentServiceHolder.getInstance().getRealmService(); try { return realmService.getTenantManager().getDomain(tenantId); } catch (UserStoreException e) { String error = "Error in obtaining tenant domain from tenant ID : " + tenantId; throw new IdentityOAuth2Exception(error, e); } }
public static String getTenantDomain(int tenantId) throws IdentityOAuth2Exception { RealmService realmService = OAuthComponentServiceHolder.getInstance().getRealmService(); try { return realmService.getTenantManager().getDomain(tenantId); } catch (UserStoreException e) { String error = "Error in obtaining tenant domain from tenant ID : " + tenantId; throw new IdentityOAuth2Exception(error, e); } }