java.lang.Object
org.bzdev.ejws.EjwsAuthenticator.Entry
- Direct Known Subclasses:
EjwsBasicAuthenticator.Entry
- Enclosing class:
- EjwsAuthenticator<E extends EjwsAuthenticator>
Base class entries in a map whose key is a user name.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the passwordgetRoles()Get the roles stored in this entrybyte[]getSBL()Get an SBL file for this entry.Get the secure basic utilities object used for authenticationbooleanisActive()Determine whether or not this entry is active.booleanDetermine whether or not this entry is pending.booleanDetermine if the SBL file for this entry (if it exists) is GZIP compressed.voidsetActive(boolean active) Set whether or not this entry is active.protected voidsetSBL(byte[] data) Set the SBL file.protected voidsetSBLCompressed(boolean value) Set if an SBL file should be compressed.
-
Constructor Details
-
Entry
public Entry()Constructor. -
Entry
Constructor specifying roles.- Parameters:
roles- the roles; null if there are none
-
-
Method Details
-
setActive
public void setActive(boolean active) Set whether or not this entry is active. Authentication should fail if an entry is not active. If this method was not called or overridden,isActive()will return true.- Parameters:
active- true if the entry is active; false otherwise
-
isActive
public boolean isActive()Determine whether or not this entry is active. qAuthentication should fail if an entry is not active.- Returns:
- true if the entry is active; false otherwise
-
isPending
public boolean isPending()Determine whether or not this entry is pending. qAuthentication should fail if an entry is not active.- Returns:
- true if the entry is active; false otherwise
-
getRoles
Get the roles stored in this entry- Returns:
- a set of roles; null if not applicable or if there are no roles defined
-
getPassword
Get the password- Returns:
- the password; null if it does not exist
-
getSecureBasicUtilities
Get the secure basic utilities object used for authentication- Returns:
- the secure basic utilities object
-
isSBLCompressed
public boolean isSBLCompressed()Determine if the SBL file for this entry (if it exists) is GZIP compressed.- Returns:
- true if the SBL file is compressed using GZIP; false otherwise
-
setSBLCompressed
protected void setSBLCompressed(boolean value) Set if an SBL file should be compressed.- Parameters:
value- true if the SBL file should be compressed; false otherwise
-
getSBL
public byte[] getSBL()Get an SBL file for this entry.- Returns:
- the SBL file as an array of bytes, possibly compressed
-
setSBL
protected void setSBL(byte[] data) Set the SBL file.- Parameters:
data- the byte array containing the SBL file
-