org.keycloak.federation.ldap.mappers.msad

## Class MSADUserAccountControlMapper

- java.lang.Object
- - org.keycloak.federation.ldap.mappers.AbstractLDAPFederationMapper
  - - org.keycloak.federation.ldap.mappers.msad.MSADUserAccountControlMapper

-     public class MSADUserAccountControlMapper
      extends AbstractLDAPFederationMapper

  Mapper specific to MSAD. It's able to read the userAccountControl and pwdLastSet attributes and set actions in Keycloak based on that. It's also able to handle exception code from LDAP user authentication (See http://www-01.ibm.com/support/docview.wss?uid=swg21290631 )
  Author:
    Marek Posolda

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MSADUserAccountControlMapper.MSADUserModelDelegate`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.federation.ldap.mappers.AbstractLDAPFederationMapper

      `ldapProvider, mapperModel, realm`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MSADUserAccountControlMapper(UserFederationMapperModel mapperModel, LDAPFederationProvider ldapProvider, RealmModel realm)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeLDAPQuery(LDAPQuery query)`
    `boolean` | `onAuthenticationFailure(LDAPObject ldapUser, UserModel user, AuthenticationException ldapException)`
    `void` | `onImportUserFromLDAP(LDAPObject ldapUser, UserModel user, boolean isCreate)`
    `void` | `onRegisterUserToLDAP(LDAPObject ldapUser, UserModel localUser)`
    `protected boolean` | `processAuthErrorCode(String errorCode, UserModel user)`
    `protected ModelException` | `processFailedPasswordUpdateException(ModelException e)`
    `UserModel` | `proxy(LDAPObject ldapUser, UserModel delegate)`

    - ### Methods inherited from class org.keycloak.federation.ldap.mappers.AbstractLDAPFederationMapper

      `getGroupMembers, getLdapProvider, getRealm, parseBooleanParameter, syncDataFromFederationProviderToKeycloak, syncDataFromKeycloakToFederationProvider`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MSADUserAccountControlMapper

          public MSADUserAccountControlMapper(UserFederationMapperModel mapperModel,
                                              LDAPFederationProvider ldapProvider,
                                              RealmModel realm)

  - ### Method Detail

    - #### beforeLDAPQuery

          public void beforeLDAPQuery(LDAPQuery query)

      Specified by:
        `beforeLDAPQuery` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.beforeLDAPQuery(UserFederationMapperModel, LDAPQuery)`

    - #### proxy

          public UserModel proxy(LDAPObject ldapUser,
                                 UserModel delegate)

      Specified by:
        `proxy` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.proxy(UserFederationMapperModel, LDAPFederationProvider, LDAPObject, UserModel, RealmModel)`

    - #### onRegisterUserToLDAP

          public void onRegisterUserToLDAP(LDAPObject ldapUser,
                                           UserModel localUser)

      Specified by:
        `onRegisterUserToLDAP` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.onRegisterUserToLDAP(UserFederationMapperModel, LDAPFederationProvider, LDAPObject, UserModel, RealmModel)`

    - #### onImportUserFromLDAP

          public void onImportUserFromLDAP(LDAPObject ldapUser,
                                           UserModel user,
                                           boolean isCreate)

      Specified by:
        `onImportUserFromLDAP` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.onImportUserFromLDAP(UserFederationMapperModel, LDAPFederationProvider, LDAPObject, UserModel, RealmModel, boolean)`

    - #### onAuthenticationFailure

          public boolean onAuthenticationFailure(LDAPObject ldapUser,
                                                 UserModel user,
                                                 AuthenticationException ldapException)

      Overrides:
        `onAuthenticationFailure` in class `AbstractLDAPFederationMapper`

    - #### processAuthErrorCode

          protected boolean processAuthErrorCode(String errorCode,
                                                 UserModel user)

    - #### processFailedPasswordUpdateException

          protected ModelException processFailedPasswordUpdateException(ModelException e)

Copyright © 2016 JBoss by Red Hat. All rights reserved.