Interface IPrincipalData

All Known Subinterfaces:
IAuthInfo, IContext
All Known Implementing Classes:
AuthInfo

public interface IPrincipalData
IPrincipalData is a bean that contains some useful information regarding the current principal associated with a portal IContext. In order to obtain a reference to the current user's IPrincipalData use the following:
 
 IPrincipalData principalData = com.webmethods.portal.bizPolicy.impl.ContextFactory.acquireContext(true);
  
Once you have the principalData, you can use the various bean methods to get more detailed information about the current user. For instance:
 
 String userDN = principalData.getDN();
 String userName = principalData.getUserName();
 String domain = principalData.getDomain();
 boolean isAnonymous = principalData.isAnonymous();
 
 
  • Field Details

  • Method Details

    • setInfo

      void setInfo(String username, String password, String domain, String authType)
      Sets a vareity of run-time information about the current user.
      Parameters:
      username - the current user's userid
      password - the user password
      domain - the current user's domain
      authType - the type of authorization (usually the type of auth handler that accepted the auth, like 'simple', 'ntlm', 'basic', etc.)
    • getUri

      String getUri()
      Retrieve the IURI for this principal. This can later be used to reference the Directory or MetaData representation of the principal.
      Returns:
      the URI represented by this AuthInfo object
    • setUri

      void setUri(String uri)
      Set the URI for this AuthInfo
      Parameters:
      uri - the URI to set
      See Also:
    • getDN

      String getDN()
      Retrieve the DN for this AuthInfo. For instance: "o=webmethods,ou=People,uid=Portal Admin"
      This information can be viewed by going to a user's Extended Profile Page
      Returns:
      the DN represented by this AuthInfo object
    • setDN

      void setDN(String dn)
      Set the DN for this AuthInfo
      Parameters:
      dn - the DN to set
      See Also:
    • getUserName

      String getUserName()
      Get the username for this AuthInfo. This is the user's id, or login name, not their Full name.
      Returns:
      the username
    • setUserName

      void setUserName(String userName)
      Sets the username for this AuthInfo
      Parameters:
      userName - the username
      See Also:
    • getPassword

      @Deprecated String getPassword()
      Deprecated.
      do not use
      Get the password
      Returns:
      the user password
    • getDomain

      String getDomain()
      Get the domain. This is the name of the directory service that the user has authenticated with.
      Returns:
      the user domain
    • setDomain

      void setDomain(String domain)
      Sets the domain
      See Also:
    • setAuthentication

      void setAuthentication(boolean isAuthenticated)
      Set the auth validation flag
      Parameters:
      isAuthenticated - if true, indicates this AuthInfo is validated, false otherwise
    • isAuthenticated

      boolean isAuthenticated()
      Determines if this user is authenticated. This may be a named user, but not yet authenticated acting in a 'guest-like' capacity.
      Returns:
      true if validated, false otherwise
    • setIsAdminSession

      void setIsAdminSession(boolean isAdminSession)
      Set the Admin session flag
      Parameters:
      isAdminSession - if true indicates this AuthInfo represents an Administrator, false otherwise
    • isAdminSession

      boolean isAdminSession()
      Determine if this user is an Administrator.
      Returns:
      true if this is an AdminSession, false otherwise
    • setIsAnonymous

      void setIsAnonymous(boolean isAnonymous)
      Set the anonymous flag for the current user.
      Parameters:
      isAnonymous - true if this is an anonymous session, false otherwise
    • isAnonymous

      boolean isAnonymous()
      Determine if current user is a guest/anonymous user.
    • setIsLoginSession

      @Deprecated void setIsLoginSession(boolean isLoginSession)
      Deprecated.
      for internal use only
      Set the login session flag
      Parameters:
      isLoginSession - true if this is a login session, false otherwise
    • isLoginSession

      @Deprecated boolean isLoginSession()
      Deprecated.
      Determines if the current session is a login session
      Returns:
      true if this is a login session, false otherwise * @deprecated for internal use only
    • isPrivilegedInfo

      boolean isPrivilegedInfo()
      Retrieve the privileged info flag That signals the login attempts should use the loginNoAuth option
      Returns:
      isPrivilegedInfo true if this signals the loginNoAuth option (default is false)
    • setIsPrivilegedInfo

      void setIsPrivilegedInfo(boolean isPrivilegedInfo)
      Set the privileged info flag That signals the login attempts should use the loginNoAuth option
      Parameters:
      isPrivilegedInfo - true if this signals the loginNoAuth option (default is false)
    • getUserID

      IThingID getUserID()
      Returns:
      the IThingID of the current user
    • getUserDirectoryURI

      IURI getUserDirectoryURI() throws PortalException
      Lookup the Directory uri from the DirProvider
      Throws:
      PortalException
    • setUserID

      void setUserID(IThingID userID)
      Parameters:
      userID -
      See Also:
    • getDomainUserName

      String getDomainUserName()
      Get the username for this AuthInfo
      Returns:
      the username