use of org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager in project carbon-identity-framework by wso2.
the class MultipleCredentialsUserProxy method deleteCredential.
public void deleteCredential(String identifier, String credentialType) throws MultipleCredentialsUserAdminException {
try {
MultipleCredentialUserStoreManager mgr = getUserStoreManager();
mgr.deleteCredential(identifier, credentialType);
} catch (UserStoreException e) {
// previously logged so logging not needed
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
}
}
use of org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager in project carbon-identity-framework by wso2.
the class MultipleCredentialsUserProxy method addUser.
/**
* @param credential
* @param roles
* @param claims
* @param profileName
* @throws MultipleCredentialsUserAdminException
*/
public void addUser(Credential credential, String[] roles, ClaimValue[] claims, String profileName) throws MultipleCredentialsUserAdminException {
try {
roles = checkRolesPermissions(roles);
MultipleCredentialUserStoreManager mgr = getUserStoreManager();
Map<String, String> claimMap = getClaimsMap(claims);
mgr.addUser(credential, roles, claimMap, profileName);
} catch (UserStoreException e) {
// previously logged so logging not needed
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
}
}
use of org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager in project carbon-identity-framework by wso2.
the class MultipleCredentialsUserProxy method setUserClaimValues.
public void setUserClaimValues(String identifer, String credentialType, ClaimValue[] claim, String profileName) throws MultipleCredentialsUserAdminException {
try {
MultipleCredentialUserStoreManager mgr = getUserStoreManager();
Map<String, String> claims = getClaimsMap(claim);
mgr.setUserClaimValues(identifer, credentialType, claims, profileName);
} catch (UserStoreException e) {
// previously logged so logging not needed
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
}
}
use of org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager in project carbon-identity-framework by wso2.
the class MultipleCredentialsUserProxy method addCredential.
public void addCredential(String anIdentifier, String credentialType, Credential credential) throws MultipleCredentialsUserAdminException {
try {
MultipleCredentialUserStoreManager mgr = getUserStoreManager();
mgr.addCredential(anIdentifier, credentialType, credential);
} catch (UserStoreException e) {
// previously logged so logging not needed
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
}
}
use of org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager in project carbon-identity-framework by wso2.
the class MultipleCredentialsUserProxy method deleteUserClaimValue.
public void deleteUserClaimValue(String identifer, String credentialType, String claimURI, String profileName) throws MultipleCredentialsUserAdminException {
try {
MultipleCredentialUserStoreManager mgr = getUserStoreManager();
mgr.deleteUserClaimValue(identifer, credentialType, claimURI, profileName);
} catch (UserStoreException e) {
// previously logged so logging not needed
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MultipleCredentialsUserAdminException(e.getMessage(), e);
}
}
Aggregations