Class AuthenticationParameters

java.lang.Object
com.caplin.keymaster.AuthenticationParameters
All Implemented Interfaces:
IAuthenticationParameters

public class AuthenticationParameters extends Object implements IAuthenticationParameters
This is the standard implementation of the IAuthenticationParameters interface.
  • Constructor Details

    • AuthenticationParameters

      public AuthenticationParameters(String userName, IUserPermissions permissions)

      Initializes a new instance of the AuthenticationParameters class, containing the username, and the permissions for that username.

      StreamLink clients supply the username to Liberator in the Liberator login request.

      In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      Parameters:
      userName - Name of the user. This is the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.
      permissions - Permissions for the user.
    • AuthenticationParameters

      public AuthenticationParameters(String userName)
      Initializes a new instance of the AuthenticationParameters class, containing just the username, and no extra data.

      StreamLink clients supply the username to Liberator in the Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      Parameters:
      userName - Name of the user. This is the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.
    • AuthenticationParameters

      public AuthenticationParameters(String userName, String extraDataToSign)
      Initializes a new instance of the AuthenticationParameters class, containing the username and extra data.

      StreamLink clients supply the username to Liberator in the Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      Parameters:
      userName - Name of the user. This is the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.
      extraDataToSign - Extra data that KeyMaster will sign within the token.
    • AuthenticationParameters

      public AuthenticationParameters(String userName, Map<String,String> mappingData)
      Initializes a new instance of the AuthenticationParameters class, containing the username and mapping data.

      StreamLink clients supply the username to Liberator in the Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      Parameters:
      userName - Name of the user. This is the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.
      mappingData - Mapping data will be signed and its values will be available for use in Liberator mappings using %{key}.
    • AuthenticationParameters

      public AuthenticationParameters(String userName, String extraDataToSign, Map<String,String> mappingData)
      Initializes a new instance of the AuthenticationParameters class, containing the username, extra data and mapping data.

      StreamLink clients supply the username to Liberator in the Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      Parameters:
      userName - Name of the user. This is the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.
      extraDataToSign - Extra data that KeyMaster will sign within the token.
      mappingData - Mapping data will be signed and its values will be available for use in Liberator mappings using %{key}.
  • Method Details

    • getExtraDataToSign

      public String getExtraDataToSign()
      Description copied from interface: IAuthenticationParameters
      Gets any extra data within the token that KeyMaster will sign.
      Specified by:
      getExtraDataToSign in interface IAuthenticationParameters
      Returns:
      The extra data.
    • setExtraDataToSign

      public void setExtraDataToSign(String value)
      Description copied from interface: IAuthenticationParameters
      Sets any extra data within the token that KeyMaster will sign.

      If you have written a custom authentication module then you can use the setExtraDataToSign to securely send information from KeyMaster to your authentication module.

      Note: If you are using KeyMaster permissioning then you should not set this property.

      Specified by:
      setExtraDataToSign in interface IAuthenticationParameters
      Parameters:
      value - the extra data to sign
    • getLiberatorUsername

      public String getLiberatorUsername()
      Description copied from interface: IAuthenticationParameters
      Gets the username that should be used to log in to Liberator.

      This property is used by StreamLink clients to obtain the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      This field is used by the StandardFormatter.

      Specified by:
      getLiberatorUsername in interface IAuthenticationParameters
      Returns:
      The username.
    • setLiberatorUsername

      public void setLiberatorUsername(String value)
      Description copied from interface: IAuthenticationParameters
      Sets the username that should be used to log in to Liberator.

      This property is used by StreamLink clients to obtain the username that is supplied to a Liberator login request. In a production system this name would normally be the authenticated username, which typically has been authenticated through a single sign-on facility.

      This field is used by the StandardFormatter.

      Specified by:
      setLiberatorUsername in interface IAuthenticationParameters
      Parameters:
      value - the liberator user name.
    • getMappingData

      public Map<String,String> getMappingData()
      Description copied from interface: IAuthenticationParameters
      Gets the mapping data.

      Mapping data will be signed and its values will be available for use in Liberator mappings using %{key}. Keys may only contain alphanumeric, underscore and full stop characters.

      Specified by:
      getMappingData in interface IAuthenticationParameters
      Returns:
      The mapping data.
    • setMappingData

      public void setMappingData(Map<String,String> value)
      Description copied from interface: IAuthenticationParameters
      Sets the mapping data.

      Mapping data will be signed and its values will be available for use in Liberator mappings using %{key}. Keys may only contain alphanumeric, underscore and full stop characters.

      Specified by:
      setMappingData in interface IAuthenticationParameters
      Parameters:
      value - the mapping data.
    • toString

      public String toString()
      Overrides:
      toString in class Object