Class ServerConfigOAuthProvider


  • public class ServerConfigOAuthProvider
    extends Object
    Defines an Oauth2 authorization provider.
    • Constructor Detail

      • ServerConfigOAuthProvider

        public ServerConfigOAuthProvider()
    • Method Detail

      • getApplicationId

        @Nullable
        public @Nullable String getApplicationId()
        Sets the application identifier that uniquely identifies the application (the API of this server). This ID is also defined as the audience for the token to verify that the token was issued for the API dServer.
        Returns:
        applicationId
      • setApplicationId

        public void setApplicationId​(String applicationId)
      • getClaimClientId

        @Nullable
        public @Nullable String getClaimClientId()
        Sets the name of the claim (in most cases \"azp\") that contains the client ID in the token.
        Returns:
        claimClientId
      • setClaimClientId

        public void setClaimClientId​(String claimClientId)
      • getClaimRoles

        @Nullable
        public @Nullable String getClaimRoles()
        Sets the name of the claim (in most cases \"roles\") that contains the roles in the token.
        Returns:
        claimRoles
      • setClaimRoles

        public void setClaimRoles​(String claimRoles)
      • getClaimSessionId

        @Nullable
        public @Nullable String getClaimSessionId()
        Specifies the name of the claim (in most cases \"sub\") that contains the session ID in the token. This must be a unique identifier that uniquely identifies the authenticated client (or user).
        Returns:
        claimSessionId
      • setClaimSessionId

        public void setClaimSessionId​(String claimSessionId)
      • getClientId

        @Nullable
        public @Nullable String getClientId()
        Sets the [OAuth2 client identifier](https://datatracker.ietf.org/doc/html/rfc6749#section-2.2).
        Returns:
        clientId
      • setClientId

        public void setClientId​(String clientId)
      • getDiscoveryUrl

        @Nullable
        public @Nullable String getDiscoveryUrl()
        Sets the [discovery URL](https://datatracker.ietf.org/doc/html/rfc8414) for the OAuth2 process, where the server can find, for example, the required public signature keys for token validation.
        Returns:
        discoveryUrl
      • setDiscoveryUrl

        public void setDiscoveryUrl​(String discoveryUrl)
      • getDisplayName

        @Nullable
        public @Nullable String getDisplayName()
        The displayed name for the provider (e.g. in the portal).
        Returns:
        displayName
      • setDisplayName

        public void setDisplayName​(String displayName)
      • getFlow

        @Nullable
        public @Nullable ServerConfigOAuthProvider.FlowEnum getFlow()
        Selects the [OAuth2 flow](https://datatracker.ietf.org/doc/html/rfc6749#section-1.2) used. Depending on the flow, different settings are necessary for the provider.
        Returns:
        flow
      • getId

        @Nullable
        public @Nullable String getId()
        Sets a unique ID that uniquely identifies this provider configuration.
        Returns:
        id
      • setId

        public void setId​(String id)
      • getMaxTimeSkew

        @Nullable
        public @Nullable Integer getMaxTimeSkew()
        The maximum time skew that may occur between the local time on the server and the local time of the issuer of the token.
        Returns:
        maxTimeSkew
      • setMaxTimeSkew

        public void setMaxTimeSkew​(Integer maxTimeSkew)
      • getName

        @Nullable
        public @Nullable ServerConfigOAuthProvider.NameEnum getName()
        Selects the OAuth2 provider or \"generic\", when not available in the list.
        Returns:
        name
      • getRoleNameAdmin

        @Nullable
        public @Nullable String getRoleNameAdmin()
        Sets the name of the role that grants administrative rights. This allows changing the default \"admin\" value to a custom role name. This must match the content of the claim defined via \"claimRoles\".
        Returns:
        roleNameAdmin
      • setRoleNameAdmin

        public void setRoleNameAdmin​(String roleNameAdmin)
      • getRoleNameUser

        @Nullable
        public @Nullable String getRoleNameUser()
        Sets the name of the role that grants normal user rights. This allows changing the default \"user\" value to a custom role name. This must match the content of the claim defined via \"claimRoles\".
        Returns:
        roleNameUser
      • setRoleNameUser

        public void setRoleNameUser​(String roleNameUser)
      • getScope

        @Nullable
        public @Nullable String getScope()
        Specifies the [scope](https://datatracker.ietf.org/doc/html/rfc6749#page-23) for the OAuth2 token. Each separated by a space.
        Returns:
        scope
      • setScope

        public void setScope​(String scope)
      • getTenantId

        @Nullable
        public @Nullable String getTenantId()
        Sets a tenant identifier for the OAuth2 request. Not all providers require a tenant id.
        Returns:
        tenantId
      • setTenantId

        public void setTenantId​(String tenantId)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object