com.filenet.api.authentication

Class OpenTokenCredentials



  • public class OpenTokenCredentials
    extends Credentials
    This class is a type of Credentials object which holds authentication materials consisting of an OAuth or OIDC token.

    The calling application is responsible for obtaining an OAuth or OIDC token representing the authenticated user in any manner it chooses.  For example, the client may obtain it by integrating their application with an OAuth/OIDC Identity Provider (IdP). Or the token may be propagated to the caller from another service. The application can even use the OAuth Resource Owner Password Credentials (ROPC) grant to obtain it from an OAuth server using username/password credentials.

    This class may only be used with the WSI transport, and in that case removes the requirement to perform a JAAS login.

    Since:
    Version 5.5.9.
    • Constructor Summary

      Constructors 
      Constructor and Description
      OpenTokenCredentials(java.lang.String userName, java.lang.String token, java.lang.String realm)
      Constructs an instance holding a specified token plus additional parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object other) 
      java.lang.String getRealm()
      Returns the realm held by this object, if any.
      java.lang.String getToken()
      Returns the OAuth or OIDC token held by this object.
      java.lang.String getUsername()
      Returns the username held by this object.
      int hashCode() 
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OpenTokenCredentials

        public OpenTokenCredentials(java.lang.String userName,
                                    java.lang.String token,
                                    java.lang.String realm)
        Constructs an instance holding a specified token plus additional parameters.
        Parameters:
        userName - The name of the user authenticated by the token.
        token - The OAuth or OIDC token.
        realm - Optional realm if the CPE server can accept requests from multiple IdPs. If provided, should match an authentication filter for the  auth-token-realm HTTP header in the CPE openidConnectClient WebSphere configuration, when multiple IdPs are configured.
    • Method Detail

      • getUsername

        public java.lang.String getUsername()
        Returns the username held by this object.
        Returns:
        The username.
      • getToken

        public java.lang.String getToken()
        Returns the OAuth or OIDC token held by this object.
        Returns:
        The token.
      • getRealm

        public java.lang.String getRealm()
        Returns the realm held by this object, if any.
        Returns:
        The realm or null.
      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

© Copyright IBM Corporation 2006, 2019. All rights reserved.