Search in sources :

Example 1 with MultipleCredentialUserStoreManager

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);
    }
}
Also used : MultipleCredentialUserStoreManager(org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) UserStoreException(org.wso2.carbon.user.core.UserStoreException) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) RegistryException(org.wso2.carbon.registry.core.exceptions.RegistryException) UserStoreException(org.wso2.carbon.user.core.UserStoreException)

Example 2 with MultipleCredentialUserStoreManager

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);
    }
}
Also used : MultipleCredentialUserStoreManager(org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) UserStoreException(org.wso2.carbon.user.core.UserStoreException) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) RegistryException(org.wso2.carbon.registry.core.exceptions.RegistryException) UserStoreException(org.wso2.carbon.user.core.UserStoreException)

Example 3 with MultipleCredentialUserStoreManager

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);
    }
}
Also used : MultipleCredentialUserStoreManager(org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) UserStoreException(org.wso2.carbon.user.core.UserStoreException) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) RegistryException(org.wso2.carbon.registry.core.exceptions.RegistryException) UserStoreException(org.wso2.carbon.user.core.UserStoreException)

Example 4 with MultipleCredentialUserStoreManager

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);
    }
}
Also used : MultipleCredentialUserStoreManager(org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) UserStoreException(org.wso2.carbon.user.core.UserStoreException) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) RegistryException(org.wso2.carbon.registry.core.exceptions.RegistryException) UserStoreException(org.wso2.carbon.user.core.UserStoreException)

Example 5 with MultipleCredentialUserStoreManager

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);
    }
}
Also used : MultipleCredentialUserStoreManager(org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) UserStoreException(org.wso2.carbon.user.core.UserStoreException) MultipleCredentialsUserAdminException(org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException) RegistryException(org.wso2.carbon.registry.core.exceptions.RegistryException) UserStoreException(org.wso2.carbon.user.core.UserStoreException)

Aggregations

MultipleCredentialUserStoreManager (org.wso2.carbon.user.core.multiplecredentials.MultipleCredentialUserStoreManager)12 RegistryException (org.wso2.carbon.registry.core.exceptions.RegistryException)11 UserStoreException (org.wso2.carbon.user.core.UserStoreException)11 MultipleCredentialsUserAdminException (org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException)11 AxisConfiguration (org.apache.axis2.engine.AxisConfiguration)1 Registry (org.wso2.carbon.registry.core.Registry)1 RealmConfiguration (org.wso2.carbon.user.api.RealmConfiguration)1 UserStoreManager (org.wso2.carbon.user.core.UserStoreManager)1