private UserStoreManager getUserStoreManager() throws UserStoreException { try { UserRealm realm = super.getUserRealm(); if (realm == null) { throw new UserStoreException(NULL_REALM_MESSAGE); } return realm.getUserStoreManager(); } catch (Exception e) { throw new UserStoreException(e); } }
private AuthorizationManager getAuthorizationManager() throws UserStoreException { try { UserRealm realm = super.getUserRealm(); if (realm == null) { throw new UserStoreException(NULL_REALM_MESSAGE); } return realm.getAuthorizationManager(); } catch (Exception e) { throw new UserStoreException(e); } }
public RealmConfiguration getRealmConfiguration() throws UserStoreException { try { RealmConfigurationDTO realmConfig = stub.getRealmConfiguration(); return WSRealmUtil.convertToRealmConfiguration(realmConfig); } catch (Exception e) { log.error(e.getMessage(), e); throw new UserStoreException("Error getting realm config", e); } }
@Override public void updateCredentialByAdmin(String userName, Object newCredential) throws UserStoreException { if (!(newCredential instanceof String)) { throw new UserStoreException(UNSUPPORTED_PASSWORD_MESSAGE); } try { stub.updateCredentialByAdmin(userName, (String) newCredential); } catch (Exception e) { handleException(e.getMessage(), e); } }
@Override public boolean authenticate(String userName, Object credential) throws UserStoreException { if (!(credential instanceof String)) { throw new UserStoreException(UNSUPPORTED_PASSWORD_MESSAGE); } try { return stub.authenticate(userName, (String) credential); } catch (Exception e) { handleException(e.getMessage(), e); } return false; }
public void updateCredentialByAdmin(String userName, Object newCredential) throws UserStoreException { if (!(newCredential instanceof String)) { throw new UserStoreException("Unsupported type of password"); } try { stub.updateCredentialByAdmin(userName, (String) newCredential); } catch (Exception e) { handleException(e.getMessage(), e); } }
public void updateCredential(String userName, Object newCredential, Object oldCredential) throws UserStoreException { if (!(newCredential instanceof String) || !(oldCredential instanceof String)) { throw new UserStoreException("Unsupported type of password"); } try { stub.updateCredential(userName, (String) newCredential, (String) oldCredential); } catch (Exception e) { handleException(e.getMessage(), e); } }
public int addTenant(Tenant tenant) throws UserStoreException { try { return getTenantManager().addTenant(tenant); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public ClaimMapping[] getAllSupportClaimMappingsByDefault() throws UserStoreException { try { return getClaimManager().getAllSupportClaimMappingsByDefault(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public void updateClaimMapping(ClaimMapping mapping) throws UserStoreException { try { getClaimManager().updateClaimMapping(mapping); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public int getTenantId(String domain) throws UserStoreException { try { return getTenantManager().getTenantId(domain); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public void addProfileConfig(ProfileConfiguration profileConfig) throws UserStoreException { try { getProfileConfigurationManager().addProfileConfig(profileConfig); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public ProfileConfiguration getProfileConfig(String profileName) throws UserStoreException { try { return (ProfileConfiguration) getProfileConfigurationManager().getProfileConfig( profileName); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public void addNewClaimMapping(ClaimMapping mapping) throws UserStoreException { try { getClaimManager().addNewClaimMapping(mapping); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public String[] getAllClaimUris() throws UserStoreException { try { return getClaimManager().getAllClaimUris(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public String getAttributeNameFromDomain(String domainName, String claimURI) throws UserStoreException { try { return getClaimManager().getAttributeName(domainName, claimURI); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public void deleteProfileConfig(ProfileConfiguration profileConfig) throws UserStoreException { try { getProfileConfigurationManager().deleteProfileConfig(profileConfig); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public ProfileConfiguration[] getAllProfiles() throws UserStoreException { try { return (ProfileConfiguration[]) getProfileConfigurationManager().getAllProfiles(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public String getAttributeName(String claimURI) throws UserStoreException { try { return getClaimManager().getAttributeName(claimURI); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } }
public void addUser(String userName, Object credential, String[] roleList, Map<String, String> claims, String profileName) throws UserStoreException { if (!(credential instanceof String)) { throw new UserStoreException("Unsupported type of password"); } try { stub.addUser(userName, (String) credential, roleList, WSRealmUtil .convertMapToClaimValue(claims), profileName, false); } catch (Exception e) { handleException(e.getMessage(), e); } }