Package com.tailf.dp

Class DpAuthorizationContext

Object
com.tailf.dp.DpAuthorizationContext

public class DpAuthorizationContext extends Object
Authorization context class. The DpAuthorizationCallback callback methods are invoked with an instance of this class that provides information about the authorization.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DpAuthorizationContext(DpUserInfo uinfo, String[] groups, int qref, int did, Dp dp)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DpAuthorizationContext

      public DpAuthorizationContext(DpUserInfo uinfo, String[] groups, int qref, int did, Dp dp)
  • Method Details

    • getUserInfo

      public DpUserInfo 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

      public String[] 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

      public void setAuthorizationTimeout(int timeoutSecs) throws IOException
      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