Class RegisteredClient.Builder

java.lang.Object
com.codename1.backend.security.oauth2.server.authorization.RegisteredClient.Builder
Enclosing class:
RegisteredClient

public static final class RegisteredClient.Builder extends Object
  • Method Details

    • clientId

      public RegisteredClient.Builder clientId(String clientId)
    • clientSecret

      public RegisteredClient.Builder clientSecret(String encodedClientSecret)
      The secret as the encoder wrote it: encoder.encode(secret).
    • clientName

      public RegisteredClient.Builder clientName(String clientName)
    • clientAuthenticationMethod

      public RegisteredClient.Builder clientAuthenticationMethod(ClientAuthenticationMethod method)
    • authorizationGrantType

      public RegisteredClient.Builder authorizationGrantType(AuthorizationGrantType grantType)
    • redirectUri

      public RegisteredClient.Builder redirectUri(String redirectUri)
    • scope

      public RegisteredClient.Builder scope(String scope)
    • resource

      public RegisteredClient.Builder resource(String resource)

      A resource server this client may ask for tokens for, named as the client names it in the resource parameter of a request (RFC 8707): an absolute address with no fragment, compared whole.

      An access token's aud is what the request asked for with resource, or the server's default audience when it asked for nothing; see AuthorizationServerSettings.Builder.defaultAudience. A client registered with resources is refused any other with invalid_target. One registered with none may name any: the audience limits where a token is accepted, and a client that could not be trusted to choose it should be given a list.

    • audience

      public RegisteredClient.Builder audience(String audience)
      The aud this client's access tokens carry when the request named no resource, in place of the server's default audience. Any non-empty value, not only an absolute address: tokens issued by Spring Authorization Server carry the client id here, and a server taking over its clients keeps their resource servers accepting the new tokens by registering audience(clientId). The user info endpoint accepts such a token too.
    • clientSettings

      public RegisteredClient.Builder clientSettings(ClientSettings clientSettings)
    • tokenSettings

      public RegisteredClient.Builder tokenSettings(TokenSettings tokenSettings)
    • build

      public RegisteredClient build()