Interface ExternalOAuth


public interface ExternalOAuth

Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint. For more information, see Requesting an access token using an external OAuth 2.0 server.

You can only configure one external OAuth 2.0 endpoint per Project. To authenticate using multiple external services (such as social network logins), use a middle layer authentication service.


Example to create an instance using the builder pattern

     ExternalOAuth externalOAuth = ExternalOAuth.builder()
             .url("{url}")
             .authorizationHeader("{authorizationHeader}")
             .build()
 
  • Method Details

    • getUrl

      @NotNull @NotNull String getUrl()

      URL with authorization header.

      Returns:
      url
    • getAuthorizationHeader

      @NotNull @NotNull String getAuthorizationHeader()

      Must not contain any leading or trailing whitespaces. Partially hidden on retrieval.

      Returns:
      authorizationHeader
    • setUrl

      void setUrl(String url)

      URL with authorization header.

      Parameters:
      url - value to be set
    • setAuthorizationHeader

      void setAuthorizationHeader(String authorizationHeader)

      Must not contain any leading or trailing whitespaces. Partially hidden on retrieval.

      Parameters:
      authorizationHeader - value to be set
    • of

      static ExternalOAuth of()
      factory method
      Returns:
      instance of ExternalOAuth
    • of

      static ExternalOAuth of(ExternalOAuth template)
      factory method to create a shallow copy ExternalOAuth
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ExternalOAuth deepCopy(@Nullable ExternalOAuth template)
      factory method to create a deep copy of ExternalOAuth
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ExternalOAuthBuilder builder()
      builder factory method for ExternalOAuth
      Returns:
      builder
    • builder

      static ExternalOAuthBuilder builder(ExternalOAuth template)
      create builder for ExternalOAuth instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withExternalOAuth

      default <T> T withExternalOAuth(Function<ExternalOAuth,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ExternalOAuth> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference