OpenID Connect

The protocol a relying party speaks to sign an agent in: discovery, keys, authorization, the code exchange and userinfo. Served on the issuer's own host, to any OpenID Connect client.

Discover the provider

GET/.well-known/openid-configuration

Access public: no credential.

OpenID Connect discovery: the issuer, its endpoints and what it supports. Cacheable for 300 seconds.

Sign in with Doorman protocol operation, served on the issuer https://id.doorman.example and on no other host. It takes no API key, app token, console session or cookie. See Sign in with Doorman.

Part of Sign in with Doorman, which a deployment switches on. Where it is off this route answers 404 not_found, and features.signIn of GET /v1/me is false.

Answers 200: The provider's metadata.

Response 200: SignInDiscovery

OpenID Connect discovery for Sign in with Doorman.

  • issuerstringrequired

  • authorization_endpointstringrequired

  • token_endpointstringrequired

  • userinfo_endpointstringrequired

  • jwks_uristringrequired

  • response_types_supported"code"[]required

  • response_modes_supported"query"[]required

  • grant_types_supported"authorization_code"[]required

  • subject_types_supported"public"[]required

  • id_token_signing_alg_values_supported"ES256"[]required

  • scopes_supported("openid" | "email" | "profile" | "owner_profile" | "owner_email")[]required

  • claims_supported("sub" | "actor_type" | "email" | "email_verified" | "name" | "owner_sub" | "owner_name" | "owner_email" | "owner_email_verified" | "iss" | "aud" | "iat" | "exp" | "auth_time" | "jti" | "nonce")[]required

  • token_endpoint_auth_methods_supported("client_secret_basic" | "client_secret_post" | "none")[]required

  • code_challenge_methods_supported"S256"[]required

  • authorization_response_iss_parameter_supportedtruerequired

  • client_id_metadata_document_supportedtruerequired

  • request_parameter_supportedfalserequired

  • request_uri_parameter_supportedfalserequired

  • claims_parameter_supportedfalserequired

Errors
StatusErrorMeaning
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "issuer": "https://id.doorman.example",
  "authorization_endpoint": "https://id.doorman.example/sign-in/authorize",
  "token_endpoint": "https://id.doorman.example/sign-in/token",
  "userinfo_endpoint": "https://id.doorman.example/sign-in/userinfo",
  "jwks_uri": "https://id.doorman.example/sign-in/jwks.json",
  "response_types_supported": [
    "code"
  ],
  "response_modes_supported": [
    "query"
  ],
  "grant_types_supported": [
    "authorization_code"
  ],
  "subject_types_supported": [
    "public"
  ],
  "id_token_signing_alg_values_supported": [
    "ES256"
  ],
  "scopes_supported": [
    "openid",
    "email",
    "profile",
    "owner_profile",
    "owner_email"
  ],
  "claims_supported": [
    "sub",
    "actor_type",
    "email",
    "email_verified",
    "name",
    "owner_sub",
    "owner_name",
    "owner_email",
    "owner_email_verified",
    "iss",
    "aud",
    "iat",
    "exp",
    "auth_time",
    "jti",
    "nonce"
  ],
  "token_endpoint_auth_methods_supported": [
    "client_secret_basic",
    "client_secret_post",
    "none"
  ],
  "code_challenge_methods_supported": [
    "S256"
  ],
  "authorization_response_iss_parameter_supported": true,
  "client_id_metadata_document_supported": true,
  "request_parameter_supported": false,
  "request_uri_parameter_supported": false,
  "claims_parameter_supported": false
}
curl -s "https://id.doorman.example/.well-known/openid-configuration"

Read the signing keys

GET/sign-in/jwks.json

Access public: no credential.

The public keys id tokens are signed with, as a JSON Web Key Set. A new key is published before it signs, and an old one stays until every token it signed has expired. Cacheable for 300 seconds; read it again on a kid it does not list.

Sign in with Doorman protocol operation, served on the issuer https://id.doorman.example and on no other host. It takes no API key, app token, console session or cookie. See Sign in with Doorman.

Part of Sign in with Doorman, which a deployment switches on. Where it is off this route answers 404 not_found, and features.signIn of GET /v1/me is false.

Answers 200: The keys.

Response 200: SignInJwks

The provider's public signing keys. A key is published before it signs and stays published until every token it signed has expired.

Errors
StatusErrorMeaning
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.
curl -s "https://id.doorman.example/sign-in/jwks.json"

Begin a sign-in

GET/sign-in/authorize

Access public: no credential.

Checks the relying party, its redirect and the request, keeps the request for 15 minutes and sends the browser to the page that finishes it. A relying party named by the URL of its identity document has that document read and checked first. A request whose relying party or redirect cannot be trusted is answered here and never redirected. Every later refusal goes back to the redirect with error, state and iss. Parameters this provider does not read are ignored, except request, request_uri and registration, which are refused by name.

Sign in with Doorman protocol operation, served on the issuer https://id.doorman.example and on no other host. It takes no API key, app token, console session or cookie. See Sign in with Doorman.

Part of Sign in with Doorman, which a deployment switches on. Where it is off this route answers 404 not_found, and features.signIn of GET /v1/me is false.

Parameters
  • response_type"code", in queryrequired

    Always code.

  • client_idstring | string, in queryrequired

    The relying party: an id this API issued, or the URL of the identity document it published. Example: sic_01jc5f1a2b3c4d5e6f7g8h9j0k.

  • redirect_uristring, in queryrequired

    A redirect the relying party registered, on its own host. Compared exactly, except the port of a redirect on the developer's own machine.

  • scopestring, in queryoptional

    Space-separated. openid is required when any is named; scopes this provider does not have are ignored. When omitted, openid email.

  • statestring, in queryoptional

    An opaque value returned unchanged with the answer.

  • noncestring, in queryoptional

    An opaque value returned unchanged in the id token.

  • code_challengestring, in queryoptional

    The S256 PKCE challenge of the verifier the relying party keeps. Required of a public relying party.

  • code_challenge_method"S256", in queryoptional

    Always S256.

  • login_hintstring, in queryoptional

    The address the relying party expects, as it was handed one when a sign-in link started the login. A hint, never a decision.

  • promptstring, in queryoptional

    none asks for an answer without interaction: where the owner would have to decide, the answer is login_required. Other values are ignored.

Answers 303: Continue in the browser, or go back to the redirect with an error.

Response header Location: The page that finishes the sign-in, or the relying party's redirect.

Answers 400: The relying party or its redirect could not be trusted, so nothing is redirected.

Response 400: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Answers 429: Too many requests. Try again after the time Retry-After gives.

Response 429: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Errors
StatusErrorMeaning
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.

Build the authorization URL with a fresh state, a nonce and an S256 challenge, then navigate the browser there. Any OpenID Connect client does this from the issuer alone. Do not fetch this route from a server: the answer is a redirect for the browser that will hold the session. See the sign-in a service runs.

Example 400 response

{
  "error": "invalid_grant"
}

Example 429 response

{
  "error": "invalid_grant"
}

Exchange a code

POST/sign-in/token

Access public: no credential.

Exchanges a code, once, within 60 seconds of its issue, for an id token and an access token that last 10 minutes. A relying party with a secret presents it with HTTP Basic or in the body, whichever it registered, and is refused the other way (401 invalid_client); a public one sends its PKCE verifier. The inbox, its account and the owner's decision are read again, so a code issued before the owner stopped the address is refused. A code presented twice ends the tokens its first exchange returned. There is no refresh token.

Sign in with Doorman protocol operation, served on the issuer https://id.doorman.example and on no other host. It takes no API key, app token, console session or cookie. See Sign in with Doorman.

Part of Sign in with Doorman, which a deployment switches on. Where it is off this route answers 404 not_found, and features.signIn of GET /v1/me is false.

Request body (application/x-www-form-urlencoded): SignInTokenRequest

A form-encoded code exchange. A relying party with a secret sends it with HTTP Basic or in the body; a public one sends the PKCE verifier. Other fields are ignored.

  • grant_type"authorization_code"required

  • codestringrequired

  • redirect_uristringrequired

  • client_idstringoptional

  • client_secretstringoptional

  • code_verifierstringoptional

Answers 200: The id token and the access token.

Response 200: SignInTokens

The id token, and an access token for the userinfo endpoint. There is no refresh token: a longer session is the relying party's own.

  • access_tokenstringrequired

  • token_type"Bearer"required

  • expires_inintegerrequired

  • id_tokenstringrequired

    An ES256 JWT. Check its signature against the published keys, and its iss, aud, exp and nonce.

  • scopestringrequired

    What was granted, which may be less than was asked: who owns the agent is told only where the owner allowed it.

Answers 400: The request or the code was refused.

Response 400: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Answers 401: The relying party could not be authenticated.

Response 401: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Answers 429: Too many requests. Try again after the time Retry-After gives.

Response 429: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Errors
StatusErrorMeaning
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.

Example 400 response

{
  "error": "invalid_grant"
}

Example 401 response

{
  "error": "invalid_grant"
}

Example 429 response

{
  "error": "invalid_grant"
}
curl -s -X POST "https://id.doorman.example/sign-in/token" \
  --data-urlencode 'grant_type=authorization_code' \
  --data-urlencode 'code=replace-with-the-code-from-the-callback' \
  --data-urlencode 'redirect_uri=https://app.example.net/auth/callback'

Read the signed-in address

GET/sign-in/userinfo

Access sign_in: the access token a relying party was issued with a sign-in, presented to the issuer; no API key, app token or console session is accepted.

The claims about the address an access token was issued for, read again from live state: the address, its name and, where the owner allows it now, who owns it. Authenticated with the access token of the code exchange, never with an API credential. An address that was deleted or stopped since answers 401.

Sign in with Doorman protocol operation, served on the issuer https://id.doorman.example and on no other host. It takes no API key, app token, console session or cookie. See Sign in with Doorman.

Part of Sign in with Doorman, which a deployment switches on. Where it is off this route answers 404 not_found, and features.signIn of GET /v1/me is false.

Answers 200: The claims the granted scopes allow, as they are now.

Response 200: SignInUserInfo

The claims about the signed-in address, read again from live state on every call.

  • substringrequired

    The address's subject: the same at every relying party, and a new one if the address is ever given up and issued again. Example: f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag

  • actor_type"agent"required

    Always agent: the one signing in is software acting for its owner.

  • emailstringoptional

    email: the address. Example: concierge@doorman.example

  • email_verifiedtrueoptional

  • namestringoptional

    profile: the address's display name, when it has one.

  • owner_substringoptional

    profile: who owns the agent, as an identifier that is different at every relying party.

  • owner_namestringoptional

    owner_profile, where the owner allowed it: the owner's name.

  • owner_emailstringoptional

    owner_email, where the owner allowed it: the owner's own address.

  • owner_email_verifiedtrueoptional

Answers 401: The access token is missing, unknown, expired or ended.

Response 401: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Response header WWW-Authenticate: Bearer error="invalid_token".

Answers 429: Too many requests. Try again after the time Retry-After gives.

Response 429: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Errors
StatusErrorMeaning
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "sub": "f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag",
  "actor_type": "agent",
  "email": "concierge@doorman.example",
  "email_verified": true
}

Example 401 response

{
  "error": "invalid_grant"
}

Example 429 response

{
  "error": "invalid_grant"
}
curl -s "https://id.doorman.example/sign-in/userinfo" \
  -H "authorization: Bearer dst_..."

Read the signed-in address with POST

POST/sign-in/userinfo

Access sign_in: the access token a relying party was issued with a sign-in, presented to the issuer; no API key, app token or console session is accepted.

The same answer as the GET, for OpenID Connect clients that send POST. The access token goes in the Authorization header.

Sign in with Doorman protocol operation, served on the issuer https://id.doorman.example and on no other host. It takes no API key, app token, console session or cookie. See Sign in with Doorman.

Part of Sign in with Doorman, which a deployment switches on. Where it is off this route answers 404 not_found, and features.signIn of GET /v1/me is false.

Answers 200: The claims the granted scopes allow, as they are now.

Response 200: SignInUserInfo

The claims about the signed-in address, read again from live state on every call.

  • substringrequired

    The address's subject: the same at every relying party, and a new one if the address is ever given up and issued again. Example: f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag

  • actor_type"agent"required

    Always agent: the one signing in is software acting for its owner.

  • emailstringoptional

    email: the address. Example: concierge@doorman.example

  • email_verifiedtrueoptional

  • namestringoptional

    profile: the address's display name, when it has one.

  • owner_substringoptional

    profile: who owns the agent, as an identifier that is different at every relying party.

  • owner_namestringoptional

    owner_profile, where the owner allowed it: the owner's name.

  • owner_emailstringoptional

    owner_email, where the owner allowed it: the owner's own address.

  • owner_email_verifiedtrueoptional

Answers 401: The access token is missing, unknown, expired or ended.

Response 401: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Response header WWW-Authenticate: Bearer error="invalid_token".

Answers 429: Too many requests. Try again after the time Retry-After gives.

Response 429: SignInProtocolError

A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.

  • error"invalid_request" | "invalid_client" | "invalid_grant" | "invalid_scope" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "access_denied" | "login_required" | "interaction_required" | "request_not_supported" | "request_uri_not_supported" | "registration_not_supported" | "invalid_token" | "invalid_client_metadata" | "temporarily_unavailable" | "server_error"required

  • error_descriptionstringoptional

Errors
StatusErrorMeaning
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "sub": "f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag",
  "actor_type": "agent",
  "email": "concierge@doorman.example",
  "email_verified": true
}

Example 401 response

{
  "error": "invalid_grant"
}

Example 429 response

{
  "error": "invalid_grant"
}
curl -s -X POST "https://id.doorman.example/sign-in/userinfo" \
  -H "authorization: Bearer dst_..."

Up Down to move, Enter to open, Esc to close