Class PasswordGrant

    • Constructor Detail

      • PasswordGrant

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

      • setGrantType

        public void setGrantType​(@NonNull
                                 java.lang.String grantType)
        Specified by:
        setGrantType in class AbstractClientSecureGrant
        Parameters:
        grantType - OAuth 2.0 Grant Type.
      • 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

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