Class MCSPV2Authenticator

  • All Implemented Interfaces:
    Authenticator

    public class MCSPV2Authenticator
    extends TokenRequestBasedAuthenticatorImmutable<MCSPToken,​MCSPV2TokenResponse>
    implements Authenticator
    This class provides an Authenticator implementation for the Multi-Cloud Saas Platform (MCSP) v2 environment. This authenticator invokes the MCSP v2 token-exchange operation (POST /api/2.0/{scopeCollectionType}/{scopeId}/apikeys/token) to obtain an access token for an apikey, and adds the access token to requests via an Authorization header of the form: "Authorization: Bearer <access-token>" When the access token expires, a new access token will be fetched.
    • Method Detail

      • newBuilder

        public MCSPV2Authenticator.Builder newBuilder()
        Returns a new Builder instance pre-loaded with the configuration from "this".
        Returns:
        the Builder instance
      • fromConfiguration

        public static MCSPV2Authenticator fromConfiguration​(java.util.Map<java.lang.String,​java.lang.String> config)
        Construct an MCSPV2Authenticator instance using properties retrieved from "config".
        Parameters:
        config - a Map containing the configuration properties
        Returns:
        the MCSPV2Authenticator instance
      • getApiKey

        public java.lang.String getApiKey()
        Returns:
        the apikey property configured on this Authenticator.
      • getURL

        public java.lang.String getURL()
        Returns:
        the url property configured on this Authenticator.
      • getScopeCollectionType

        public java.lang.String getScopeCollectionType()
        Returns:
        the scopeCollectionType property configured on this Authenticator.
      • getScopeId

        public java.lang.String getScopeId()
        Returns:
        the scopeId property configured on this Authenticator.
      • includeBuiltinActions

        public boolean includeBuiltinActions()
        Returns:
        the includeBuiltinActions property configured on this Authenticator.
      • includeCustomActions

        public boolean includeCustomActions()
        Returns:
        the includeCustomActions property configured on this Authenticator.
      • includeRoles

        public boolean includeRoles()
        Returns:
        the includeRoles property configured on this Authenticator.
      • prefixRoles

        public boolean prefixRoles()
        Returns:
        the prefixRoles property configured on this Authenticator.
      • getCallerExtClaim

        public java.util.Map<java.lang.String,​java.lang.String> getCallerExtClaim()
        Returns:
        the callerExtClaim property configured on this Authenticator.