Class AuthenticationResult
Static instances of this class are used to provide various authentication results to the Liberator.
Most calls to Authenticator
methods are required to return one of the static instances of
this class to indicate the result of the authentication operation.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AuthenticationResult
Use to indicate the supplied login credentials are for an expired user account.static final AuthenticationResult
Use only when performing content-based permissioning where the content is not yet available.static final AuthenticationResult
Use in combination withDelayedResultReceiver.delayedCheckUserResult
orDelayedResultReceiver.delayedMapObjectResult
when the authentication result is not yet available.static final AuthenticationResult
Use to indicate that authorisation or authentication is denied.static final AuthenticationResult
Use when an error has occured in the authentication process.static final AuthenticationResult
Indicates no object name mapping has taken place.static final AuthenticationResult
Use when authentication is denied because the supplied ip address is deemed unacceptable.static final AuthenticationResult
Use when the supplied password is not valid and you want this information known to the client.static final AuthenticationResult
Use when the supplied user name is not valid.static final AuthenticationResult
Use to indicate a successful authentication result.static final AuthenticationResult
Use to indicate that some global maximum session count has been met/exceeded.static final AuthenticationResult
Use to indicate the supplied login credentials have exceeded their concurrent maximum allowed login count.static final AuthenticationResult
Use to indicate a custom authentication result.static final AuthenticationResult
Use to indicate a custom authentication result.static final AuthenticationResult
Use to indicate a custom authentication result.static final AuthenticationResult
Use to indicate a custom authentication result.static final AuthenticationResult
Use to indicate a custom authentication result. -
Method Summary
-
Field Details
-
OK
Use to indicate a successful authentication result. -
AGAIN
Use only when performing content-based permissioning where the content is not yet available.
When
RTTPObject.getType()
returns a 200 code this indicates the object is an active object that hasn't had its content populated. By returning this result you indicate you are not ready to authenticate and would like another call toAuthenticator.checkRead
when the content is available. -
DELAYED
Use in combination with
DelayedResultReceiver.delayedCheckUserResult
orDelayedResultReceiver.delayedMapObjectResult
when the authentication result is not yet available.When the system receives this authentication result it waits for a callback for the final authentication result. This is used when the result may take some time to compute - e.g. when a database call needs to be made or a remote server needs to generate mapping information. The call to the authentication interface is blocking, so it is recommended that this result is used in these cases to avoid inhibiting server performance.
-
DENY
Use to indicate that authorisation or authentication is denied.
This is the standard failure result. Use for all object-level authentication failures and any user login authorisation failures where one of the more specific failures (e.g.
INVALID_USER
is not appropriate. -
FALSE
Indicates no object name mapping has taken place.
Use only as a return code from
Authenticator.mapObject(com.caplin.server.auth.UserSession, com.caplin.server.auth.MapObject)
. If the object name is not mapped then this authentication result should be used. -
INVALID_USER
Use when the supplied user name is not valid.
This authentication result is used when the user name passed in the
AuthenticationUser
object toAuthenticator.checkUser
is deemed invalid.It may be preferrable to use this result in the case where the user name is valid and the password is not, rather that the
INVALID_PASS
result. -
INVALID_PASS
Use when the supplied password is not valid and you want this information known to the client.
This authentication result can be used when the user name passed in the
AuthenticationUser
object toAuthenticator.checkUser
is deemed invalid.it is more secure to use the
INVALID_USER
result is even when the only the password is incorrect. This is recommended, unless the client specifically needs to know that the password was invalid. -
INVALID_ADDR
Use when authentication is denied because the supplied ip address is deemed unacceptable.
May be used for location-based authentication or for blocking ip address ranges.
-
ACCT_EXPIRED
Use to indicate the supplied login credentials are for an expired user account. -
USER_LC_EXCEEDED
Use to indicate the supplied login credentials have exceeded their concurrent maximum allowed login count. -
SITE_LC_EXCEEDED
Use to indicate that some global maximum session count has been met/exceeded. -
ERROR
Use when an error has occured in the authentication process.
This return code will be treated as an authentication failure so should be used with appropriate caution.
-
USER1
Use to indicate a custom authentication result.
The following 5 return codes can be used to indicate a custom authentication result to the client. The client must be aware of the meaning of each different result and handle it accordingly.
-
USER2
Use to indicate a custom authentication result. -
USER3
Use to indicate a custom authentication result. -
USER4
Use to indicate a custom authentication result. -
USER5
Use to indicate a custom authentication result.
-
-
Method Details