Class CouchProfileService

java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.profile.definition.ProfileDefinitionAware
org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
org.pac4j.couch.profile.service.CouchProfileService
All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator, org.pac4j.core.profile.service.ProfileService<CouchProfile>

public class CouchProfileService extends org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
The CouchDB profile service.
Since:
2.0.0
Author:
Elie Roux
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.pac4j.core.profile.service.AbstractProfileService

    attributeNames, ID, LINKEDID, logger, SERIALIZED_PROFILE

    Fields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator

    ALWAYS_VALIDATE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector)
     
    CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, String attributes)
     
    CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, String attributes, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
     
    CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
    insert(Map<String,Object> attributes)
     
    protected void
    internalInit(boolean forceReinit)
     
    protected List<Map<String,Object>>
    read(List<String> names, String key, String value)
     
    protected void
    update(Map<String,Object> attributes)
     

    Methods inherited from class org.pac4j.core.profile.service.AbstractProfileService

    convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getPasswordAttribute, getPasswordEncoder, getSerializer, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setPasswordAttribute, setPasswordEncoder, setSerializer, setUsernameAttribute, update, validate

    Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware

    getProfileDefinition, setProfileDefinition, setProfileDefinitionIfUndefined

    Methods inherited from class org.pac4j.core.util.InitializableObject

    afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CouchProfileService

      public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, String attributes, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
    • CouchProfileService

      public CouchProfileService()
    • CouchProfileService

      public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector)
    • CouchProfileService

      public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, String attributes)
    • CouchProfileService

      public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
  • Method Details

    • internalInit

      protected void internalInit(boolean forceReinit)
      Overrides:
      internalInit in class org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
    • insert

      protected void insert(Map<String,Object> attributes)
      Specified by:
      insert in class org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
    • update

      protected void update(Map<String,Object> attributes)
      Specified by:
      update in class org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
    • deleteById

      protected void deleteById(String id)
      Specified by:
      deleteById in class org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
    • read

      protected List<Map<String,Object>> read(List<String> names, String key, String value)
      Specified by:
      read in class org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>