Class PasswordGrant

    • Constructor Detail

      • PasswordGrant

        public PasswordGrant()
        Default constructor.
      • PasswordGrant

        public PasswordGrant​(AuthenticationRequest authenticationRequest,
                             OauthClientConfiguration clientConfiguration)
        Parameters:
        authenticationRequest - The authentication request
        clientConfiguration - The client configuration
    • Method Detail

      • getGrantType

        @Nonnull
        public java.lang.String getGrantType()
        Returns:
        OAuth 2.0 Grant Type.
      • setGrantType

        public void setGrantType​(@Nonnull
                                 java.lang.String grantType)
        Parameters:
        grantType - OAuth 2.0 Grant Type.
      • getClientId

        @Nonnull
        public java.lang.String getClientId()
        Returns:
        The application's Client identifier.
      • setClientId

        public void setClientId​(@Nonnull
                                java.lang.String clientId)
        Description copied from interface: SecureGrant
        Sets the client id in the grant.
        Specified by:
        setClientId in interface SecureGrant
        Parameters:
        clientId - Application's Client identifier.
      • setClientSecret

        public void setClientSecret​(java.lang.String clientSecret)
        Description copied from interface: SecureGrant
        Sets the client secret in the grant.
        Specified by:
        setClientSecret in interface SecureGrant
        Parameters:
        clientSecret - Application's Client clientSecret.
      • getClientSecret

        public java.lang.String getClientSecret()
        Returns:
        The application's Client clientSecret.
      • getUsername

        @Nonnull
        public java.lang.String getUsername()
        Returns:
        An username
      • setUsername

        public void setUsername​(@Nonnull
                                java.lang.String username)
        Parameters:
        username - An username
      • getPassword

        @Nonnull
        public java.lang.String getPassword()
        Returns:
        An password
      • setPassword

        public void setPassword​(@Nonnull
                                java.lang.String password)
        Parameters:
        password - An password
      • getScope

        @Nullable
        public java.lang.String getScope()
        Returns:
        Requested scopes separed by spaces
      • setScope

        public void setScope​(@Nonnull
                             java.lang.String scope)
        Parameters:
        scope - Requested scopes separed by spaces
      • toMap

        public java.util.Map<java.lang.String,​java.lang.String> toMap()
        Specified by:
        toMap in interface AsMap
        Returns:
        this object as a Map