Skip to content

Custom Authorization Servers

Use a custom authorization server to create and apply authorization policies to secure your APIs. An access token that's minted by a custom authorization server is consumed by your APIs.

Note: Okta has two types of authorization servers: the org authorization server and the custom authorization server. To learn more about each type of authorization server and when to use them, see Authorization servers.

You can create multiple custom authorization servers within a single Okta org that you can use to protect your own resource servers. Within each authorization server, define your own custom OAuth 2.0 scopes, claims, and access policies to support authorization for your APIs.

Retrieve the OAuth 2.0 metadata

Request

CORS

Retrieves OAuth 2.0 metadata for the specified custom authorization server. Clients can use this information to programmatically configure their interactions with Okta. Custom scopes are returned only when they are configured to be publicly discoverable. Custom claims are never returned.

Note: Okta supports two URL formats for this endpoint. The RFC 8414-compliant format (/.well-known/oauth-authorization-server/oauth2/{authorizationServerId}) is the current standard. The legacy format (/oauth2/{authorizationServerId}/.well-known/oauth-authorization-server) remains supported for backwards compatibility with no planned removal date.

Path
authorizationServerIdstringrequired

id of the authorization server

Query
client_idstring

You can configure clients to format the issuer differently. Pass in the client_id to ensure that the returned issuer format matches.

GET
/.well-known/oauth-authorization-server/oauth2/{authorizationServerId}
curl -i -X GET \
  'https://okta-subdomain.pixtulate.com/.well-known/oauth-authorization-server/oauth2/{authorizationServerId}?client_id=string'

Responses

Success

Bodyapplication/json
authorization_endpointstring

URL of the authorization server's authorization endpoint

backchannel_authentication_request_signing_alg_values_supportedArray of strings

A list of signing algorithms that this authorization server supports for signed requests

backchannel_token_delivery_modes_supportedArray of strings(TokenDeliveryMode)

The delivery modes that this authorization server supports for Client-Initiated Backchannel Authentication

Items Value:"poll"
claims_supportedArray of strings(Claim)

A list of the claims supported by this authorization server

code_challenge_methods_supportedArray of strings(CodeChallengeMethod)

A list of PKCE code challenge methods supported by this authorization server

Items Value:"S256"
device_authorization_endpointstring
dpop_signing_alg_values_supportedArray of strings

A list of signing algorithms supported by this authorization server for Demonstrating Proof-of-Possession (DPoP) JWTs

Items Enum:"ES256""ES384""ES512""RS256""RS384""RS512"
end_session_endpointstring

URL of the authorization server's logout endpoint

grant_types_supportedArray of strings

A list of the grant type values that this authorization server supports

introspection_endpointstring

URL of the authorization server's introspection endpoint

introspection_endpoint_auth_methods_supportedArray of strings

A list of client authentication methods supported by this introspection endpoint

issuerstring

The authorization server's issuer identifier. In the context of this document, this is your authorization server's base URL. This becomes the iss claim in an access token.

jwks_uristring

URL of the authorization server's JSON Web Key Set document

pushed_authorization_request_endpointstring
registration_endpointstring

URL of the authorization server's JSON Web Key Set document

request_object_signing_alg_values_supportedArray of strings

A list of signing algorithms that this authorization server supports for signed requests

request_parameter_supportedboolean

Indicates if request parameters are supported by this authorization server

response_modes_supportedArray of strings(ResponseMode)

A list of the response_mode values that this authorization server supports

Items Enum ValueDescription
fragment

Parameters are encoded in the URL fragment added to the redirect_uri when redirecting back to the client.

query

Parameters are encoded in the query string added to the redirect_uri when redirecting back to the client.

form_post

Parameters are encoded as HTML form values (application/x-www-form-urlencoded format) and are transmitted through the HTTP POST method to the client.

okta_post_message

Uses HTML5 Web Messaging, for example, window.postMessage() instead of the redirect for the authorization response from the /authorize endpoint.

okta_post_message is an adaptation of the Web Message Response Mode. This value provides a secure way for a single-page app to perform a sign-in flow in a pop-up window or an iFrame and receive the ID token, access token, and/or authorization code back in the parent page without leaving the context of that page.

Use the postMessage() data object to help you when working with the okta_post_message value of the response_mode request parameter.

ParameterDescriptionData Type
access_tokenAn access token. This is returned if the response_type included token.string
errorThe error code, if something went wrongstring
error_descriptionAdditional error information (if any)string
id_tokenAn ID token. This is returned if the response_type includes id_token.string
stateThe unmodified state value from the requeststring
response_types_supportedArray of strings(ResponseTypesSupported)

A list of the response_type values that this authorization server supports. Can be a combination of code, token, and id_token.

Items Enum:"code""code id_token""code id_token token""code token""id_token""id_token token""token"
revocation_endpointstring

URL of the authorization server's revocation endpoint

revocation_endpoint_auth_methods_supportedArray of strings

A list of client authentication methods supported by this revocation endpoint

scopes_supportedArray of strings(Scope)

A list of the scope values that this authorization server supports

subject_types_supportedArray of strings(SubjectType)

A list of the subject identifier types that this authorization server supports. Valid types include pairwise and public, but only public is currently supported. See the Subject Identifier Types section in the OpenID Connect specification.

Items Enum:"pairwise""public"
token_endpointstring

URL of the authorization server's token endpoint

token_endpoint_auth_methods_supportedArray of strings

A list of client authentication methods supported by this token endpoint

Response
{ "issuer": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7", "authorization_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/authorize", "token_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/token", "registration_endpoint": "https://{yourOktaDomain}/oauth2/v1/clients", "jwks_uri": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/keys", "response_types_supported": [ "code", "token", "id_token", "code id_token", "code token", "id_token token", "code id_token token" ], "response_modes_supported": [ "query", "fragment", "form_post", "okta_post_message" ], "grant_types_supported": [ "authorization_code", "implicit", "refresh_token", "password", "client_credentials", "urn:ietf:params:oauth:grant-type:device_code" ], "subject_types_supported": [ "public" ], "scopes_supported": [ "okta.myAccount.email.manage", "okta.myAccount.email.read", "okta.myAccount.manage", "okta.myAccount.phone.manage", "okta.myAccount.phone.read", "okta.myAccount.profile.manage", "okta.myAccount.profile.read", "okta.myAccount.read", "openid", "profile", "email", "address", "phone", "offline_access", "device_sso" ], "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" ], "claims_supported": [ "ver", "jti", "iss", "aud", "iat", "exp", "cid", "uid", "scp", "sub" ], "code_challenge_methods_supported": [ "S256" ], "introspection_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/introspect", "introspection_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" ], "revocation_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/revoke", "revocation_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" ], "end_session_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/logout", "request_parameter_supported": true, "request_object_signing_alg_values_supported": [ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512" ], "device_authorization_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/device/authorize", "pushed_authorization_request_endpoint": "https://{yourOktaDomain}/oauth2/aus59pz16qgMvHvBS0g7/v1/par" }