Class IdentityServiceAccountProvider

java.lang.Object
fr.becpg.repo.authentication.provider.IdentityServiceAccountProvider

@Service public class IdentityServiceAccountProvider extends Object

IdentityServiceAccountProvider class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • PROHIBITED_CHARS

      private static final Pattern PROHIBITED_CHARS
    • GET_USER_ID_ERROR

      private static final String GET_USER_ID_ERROR
      See Also:
    • logger

      private static org.apache.commons.logging.Log logger
    • enabled

      @Value("${identity-service.create-user.enabled:false}") private Boolean enabled
    • identityServiceUserName

      @Value("${identity-service.client-admin.username:#{null}}") private String identityServiceUserName
    • identityServicePassword

      @Value("${identity-service.client-admin.password:#{null}}") private String identityServicePassword
    • realm

      @Value("${identity-service.realm}") private String realm
    • clientId

      @Value("${identity-service.resource}") private String clientId
    • clientSecret

      @Value("${identity-service.credentials.secret:#{null}}") private String clientSecret
    • authServerUrl

      @Value("${identity-service.auth-server-url}") private String authServerUrl
  • Constructor Details

    • IdentityServiceAccountProvider

      public IdentityServiceAccountProvider()
  • Method Details

    • isEnabled

      public Boolean isEnabled()

      isEnabled.

      Returns:
      a Boolean object
    • getZoneId

      public String getZoneId()

      getZoneId.

      Returns:
      a String object
    • registerAccount

      public boolean registerAccount(BeCPGUserAccount userAccount)

      registerAccount.

      Parameters:
      userAccount - a BeCPGUserAccount object
      Returns:
      a boolean
    • deleteAccount

      public void deleteAccount(String username)

      deleteAccount.

      Parameters:
      username - a String object
    • updateUser

      public boolean updateUser(BeCPGUserAccount userAccount)

      updateUser.

      Parameters:
      userAccount - a BeCPGUserAccount object
      Returns:
      a boolean
    • sanitizeAccount

      private void sanitizeAccount(BeCPGUserAccount userAccount)
    • sanitize

      private String sanitize(String input)
    • updatePassword

      public void updatePassword(String username, String newPassword)

      updatePassword.

      Parameters:
      username - a String object
      newPassword - a String object
    • getUserId

      private String getUserId(String username)
    • getAdminAccessToken

      private String getAdminAccessToken()
    • toString

      public String toString()
      Overrides:
      toString in class Object