Package com.tailf.dp
Class DpAuthorizationContext
Object
com.tailf.dp.DpAuthorizationContext
Authorization context class. The DpAuthorizationCallback callback methods
are invoked with an instance of this class that provides information about
the authorization.
-
Constructor Summary
ConstructorDescriptionDpAuthorizationContext
(DpUserInfo uinfo, String[] groups, int qref, int did, Dp dp) -
Method Summary
Modifier and TypeMethodDescriptionString[]
If success is true, the AAA authentication succeeded, and groups is an array of length ngroups that gives the groups that will be assigned to the user at login.The uinfo contains an instance of DpUserInfo with details about the user logging in, specifically user name, password (if used), source IP address, context, and protocol.void
setAuthorizationTimeout
(int timeoutSecs) The authorization callbacks are expected to complete quickly, However in case they send requests to a remote server, and such a request needs to be retried, this function can be used to extend the timeout for the current callback invocation.
-
Constructor Details
-
DpAuthorizationContext
-
-
Method Details
-
getUserInfo
The uinfo contains an instance of DpUserInfo with details about the user logging in, specifically user name, password (if used), source IP address, context, and protocol. Note that the user session does not actually exist at this point, even if the AAA authentication was successful - it will only be created if the callback accepts the authentication, hence e.g. the usid element is always 0.- Returns:
- DpUserInfo userinfo
-
getGroups
If success is true, the AAA authentication succeeded, and groups is an array of length ngroups that gives the groups that will be assigned to the user at login. If the callback returns true the complete authentication succeeds and the user is logged in. If it returns false (or an invalid return value), the authentication fails.- Returns:
- String[] groups
-
setAuthorizationTimeout
The authorization callbacks are expected to complete quickly, However in case they send requests to a remote server, and such a request needs to be retried, this function can be used to extend the timeout for the current callback invocation. The timeout is given in seconds from the point in time when the function is called.- Parameters:
timeoutSecs
-- Throws:
IOException
-