Skip to content

Choosing a flow ​

This page helps you pick the right authorization flow based on who is calling, whether a user is involved, and whether a browser is available. It also marks the actual level of support for each flow in wicket v0.1.4. The support levels come from reviewing the source and running the code, not from what the discovery document declares — the two disagree in a few places.

Decision table ​

ScenarioTypical examplesRecommended flowSetAllowedGrantTypesv0.1.4 status
Machine to machine, no userScheduled jobs, internal microservice callsClient credentialswicket.GrantTypesClientCredentialsWorks; verified end to end
Server-side web app with a userTraditional web back office, BFFAuthorization code + PKCE (confidential client)wicket.GrantTypesCodeWorks; the host must provide the login page and the login cookie handler
SPA / mobile app with a userSingle-page apps, iOS / Android appsAuthorization code + PKCE (public client, RequireClientSecret = false)wicket.GrantTypesCodeWorks; same as above
Staying signed in long termAny of the user scenarios aboveAdd refresh tokens (offline_access)Set AllowOfflineAccess on the clientCan be issued and used, but v0.1.4 does not yet implement expiration or rotation policies; the host must add safeguards
Devices without a browser or with limited inputTVs, CLI tools, IoTDevice authorizationwicket.GrantTypesDeviceFlowNot for production: no built-in device authorization endpoint, and issued tokens lack scopes
Backend-initiated, user confirms on another deviceService counters, call-center identity checksCIBA (poll only)wicket.GrantTypesBackchannelAuthenticationWorks; you must replace the default user validator, and the host implements user confirmation
User sign-outAll user scenariosSessions and logout—/connect/endsession works; front-/back-channel notifications and checksession have no effect

Quick decision ​

  1. Who does the token represent? Only the service itself → client credentials. A user → continue.
  2. Can the user act in the initiator's browser right now? Yes → authorization code + PKCE. No → continue.
  3. Does the user confirm on another device while your backend initiates? Yes → CIBA. If it is a terminal without a browser → device authorization (in v0.1.4, use the alternatives listed on the device authorization page instead).

Discouraged or disabled-by-default flows ​

FlowNotes
Implicit flow (response_type=token / id_token)Still supported in code, but tokens travel through the browser address bar; use authorization code + PKCE for new apps. SetAllowedGrantTypes does not allow combining implicit with authorization_code
Resource owner password (password)Rejected by default: without an injected validator, an "unsupported" placeholder implementation is used, and it does not appear in the discovery document's grant_types_supported. If you really need it for legacy compatibility, inject a validator with cfg.SetResourceOwnerValidator
Hybrid flow (code id_token, etc.)Still supported in code; new apps have no reason to use it

Discovery document vs. actual implementation ​

Client libraries usually configure themselves from /.well-known/openid-configuration. Several entries in the v0.1.4 discovery document do not match reality. When integrating, rely on the flow pages on this site:

Discovery fieldDeclaredActual
device_authorization_endpoint/connect/deviceauthorizationNot registered; requests fall through to the host handler
revocation_endpoint/connect/revocationNot registered; requests fall through to the host handler
frontchannel_logout_supported / backchannel_logout_supportedtrueNeither actually sends notifications
check_session_iframe/connect/checksessionThe page exists, but authorization responses do not return session_state

For a full description of the fields, see Discovery document.

Conventions shared by all flows ​

  • The token endpoint POST /connect/token accepts only form-encoded bodies; client authentication supports client_secret_basic and client_secret_post.
  • In v0.1.4, token endpoint errors always return HTTP 400 (including invalid_client). The response body is JSON with error, error_description, and a custom field.
  • Successful responses always contain the id_token and refresh_token keys; when not issued, their values are empty strings.

Released under the Apache License 2.0 · Documentation © 2026 Wicket authors