@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class AuthenticationInfo extends Object
Constructor and Description |
---|
AuthenticationInfo()
Creates a new set of authentication information to be used for unauthenticated clients.
|
AuthenticationInfo(Entry authenticationEntry,
boolean isRoot)
Creates a new set of authentication information to be used for clients that are authenticated internally.
|
AuthenticationInfo(Entry authenticationEntry,
Dn simpleBindDN,
boolean isRoot)
Creates a new set of authentication information to be used for clients that have successfully performed simple
authentication.
|
AuthenticationInfo(Entry authenticationEntry,
Entry authorizationEntry,
String saslMechanism,
ByteString saslCredentials,
boolean isRoot)
Creates a new set of authentication information to be used for clients that have authenticated using a SASL
mechanism.
|
AuthenticationInfo(Entry authenticationEntry,
String saslMechanism,
boolean isRoot)
Creates a new set of authentication information to be used for clients that have authenticated using a SASL
mechanism.
|
Modifier and Type | Method and Description |
---|---|
AuthenticationInfo |
duplicate(Entry newAuthenticationEntry,
Entry newAuthorizationEntry)
Creates a duplicate of this
AuthenticationInfo object with the new authentication and authorization
entries. |
Dn |
getAuthenticationDN()
Retrieves the DN of the user as whom the client is authenticated.
|
Entry |
getAuthenticationEntry()
Retrieves the entry for the user as whom the client is authenticated.
|
Dn |
getAuthorizationDN()
Retrieves the DN for the user that should be used as the default authorization identity.
|
Entry |
getAuthorizationEntry()
Retrieves the entry for the user that should be used as the default authorization identity.
|
Dn |
getSimpleBindDN()
Retrieves the bind DN that the client used for simple authentication.
|
boolean |
hasAuthenticationType(AuthenticationType authenticationType)
Indicates whether this client has authenticated using the specified authentication type.
|
boolean |
hasSASLMechanism(String saslMechanism)
Indicates whether the client is currently authenticated using the specified SASL mechanism.
|
boolean |
isAuthenticated()
Indicates whether this client has successfully authenticated to the server.
|
boolean |
isRoot()
Indicates whether this client should be considered a root user.
|
boolean |
mustChangePassword()
Indicates whether the authenticated user must change his/her password before any other operation will be allowed.
|
void |
setAuthenticationDN(Dn dn)
Sets the DN of the user as whom the client is authenticated, does nothing if the client is unauthenticated.
|
void |
setAuthorizationDN(Dn dn)
Sets the DN for the user that should be used as the default authorization identity, does nothing if the client is
unauthorized.
|
void |
setMustChangePassword(boolean mustChangePassword)
Specifies whether the authenticated user must change his/her password before any other operation will be allowed.
|
String |
toString()
Retrieves a string representation of this authentication info structure.
|
public AuthenticationInfo()
public AuthenticationInfo(Entry authenticationEntry, boolean isRoot)
authenticationEntry
- The entry of the user that has authenticated, or null
to indicate an unauthenticated user.isRoot
- Indicates whether the authenticated user is a root user.public AuthenticationInfo(Entry authenticationEntry, Dn simpleBindDN, boolean isRoot)
authenticationEntry
- The entry of the user that has authenticated. It must not be null
.simpleBindDN
- The bind DN that was used to perform the simple authentication.isRoot
- Indicates whether the authenticatedpublic AuthenticationInfo(Entry authenticationEntry, String saslMechanism, boolean isRoot)
authenticationEntry
- The entry of the user that has authenticated. It must not be null
.saslMechanism
- The SASL mechanism used to authenticate. This must be provided in all-uppercase characters and must
not be null
.isRoot
- Indicates whether the authenticated user is a root user.public AuthenticationInfo(Entry authenticationEntry, Entry authorizationEntry, String saslMechanism, ByteString saslCredentials, boolean isRoot)
authenticationEntry
- The entry of the user that has authenticated. It must not be null
.authorizationEntry
- The entry of the user that will be used as the default authorization identity, or null
to
indicate that the authorization identity should be the unauthenticated user.saslMechanism
- The SASL mechanism used to authenticate. This must be provided in all-uppercase characters and must
not be null
.saslCredentials
- The SASL credentials used to authenticate. It must not be null
.isRoot
- Indicates whether the authenticated user is a root user.public boolean isAuthenticated()
true
if this client has successfully authenticated to the server, or false
if not.public boolean isRoot()
true
if this client should be considered a root user, or false
if not.public boolean mustChangePassword()
true
if the user must change his/her password before any other operation will be allowed, or
false
if not.public void setMustChangePassword(boolean mustChangePassword)
mustChangePassword
- Specifies whether the authenticated user must change his/her password before any other operation will
be allowed.public boolean hasAuthenticationType(AuthenticationType authenticationType)
authenticationType
- The authentication type for which to make the determination.true
if the client has authenticated using the specified authentication type, or false
if
not.public Entry getAuthenticationEntry()
null
if the client is
unauthenticated.public Dn getAuthenticationDN()
null
if the client is unauthenticated.public void setAuthenticationDN(Dn dn)
dn
- authentication identity DN.public Entry getAuthorizationEntry()
null
if the
authorization identity should be the unauthenticated user.public Dn getAuthorizationDN()
null
if the
authorization identity should be the unauthenticated user.public void setAuthorizationDN(Dn dn)
dn
- authorization identity DN.public Dn getSimpleBindDN()
null
if the client is not
authenticated using simple authentication.public boolean hasSASLMechanism(String saslMechanism)
saslMechanism
- The SASL mechanism for which to make the determination. Note that this must be provided in all
uppercase characters.true
if the client is authenticated using the specified SASL mechanism, or false
if not.public String toString()
public AuthenticationInfo duplicate(Entry newAuthenticationEntry, Entry newAuthorizationEntry)
AuthenticationInfo
object with the new authentication and authorization
entries.newAuthenticationEntry
- The updated entry for the user as whom the associated client connection is authenticated.newAuthorizationEntry
- The updated entry for the default authorization identity for the associated client connection.AuthenticationInfo
object with the specified authentication and
authorization entries.Copyright 2010-2020 ForgeRock AS.