Class OidcDeviceAuthorizationCallback

java.lang.Object
org.mockserver.oidc.OidcDeviceAuthorizationCallback
All Implemented Interfaces:
ExpectationCallback<HttpResponse>, ExpectationResponseCallback

public class OidcDeviceAuthorizationCallback extends Object implements ExpectationResponseCallback
Mock OIDC/OAuth2 device-authorization endpoint, implementing the OAuth 2.0 Device Authorization Grant (RFC 8628 §3.2).

This is a mock — there is no device login UI. It issues an opaque device_code paired with a short human-readable user_code, records them (with the requested scope) in OidcAuthorizationStore, and returns the RFC 8628 device-authorization response: device_code, user_code, verification_uri, verification_uri_complete, expires_in, interval.

The client then polls /token with grant_type=urn:ietf:params:oauth:grant-type:device_code (handled by OidcTokenCallback), which answers authorization_pending for the configured number of polls before minting tokens.

  • Field Details

    • DEVICE_CODE_GRANT_TYPE

      public static final String DEVICE_CODE_GRANT_TYPE
      RFC 8628 device-code grant type used when polling the token endpoint.
      See Also:
  • Constructor Details

    • OidcDeviceAuthorizationCallback

      public OidcDeviceAuthorizationCallback()
  • Method Details