Package com.irurueta.authserver.authorization.api.web.implicit
package com.irurueta.authserver.authorization.api.web.implicit
OAuth 2.0 Device Authorization Grant (RFC 8628) for input-constrained clients, such as a command line tool: the
protocol customizer that wires the device authorization and verification endpoints, the guard that applies the
multi-factor policy and the limit on the attempts to the verification endpoint, and the verification page.
-
ClassDescriptionThe framework's own answer to a granted authorization code request, repeated because installing a response handler replaces it and the framework does not expose it: a redirect to the redirect URI with
codeand, when the request had one,statein the query.Reads the identifier of a public client of the device flow, the only kind of client authentication that flow has for a device that cannot keep a secret: theclient_idof the request to the device authorization endpoint and of the polling request to the token endpoint with the device code grant.Authenticates a public client of the device flow by its identifier: the client must be registered and must have registered thenoneauthentication method, which is what makes it public.The request of a public client of the device flow to be authenticated by its identifier alone.Installs the device authorization grant in the protocol chain.Enables the OAuth 2.0 Device Authorization Grant on the protocol chain.Configuration of the limit on the attempts to verify a user code (authserver.device.rate-limit.*): the user code is short, so the attempts a signed-in user and a client address may make in a window are bounded, on top of the expiry of the code itself.Serves the device verification page, as the contractapis/auth-server/web-pages/auth-server-pages-v1.yamldescribes it through the generatedDeviceVerificationPageApi: the form where the user types the code the device shows.Error handler of the device verification endpoint.Raised while a device verification request is converted when its client address or user made too many attempts.Rate limiter of the attempts to verify a user code, on the pattern of the other limiters of this server: Bucket4j token buckets in Caffeine caches (FixedWindowBuckets), one per client address and one per signed-in user, so a user code, which is short, cannot be guessed faster than the limits allow.Guards the device verification endpoint.The result of a granted legacy implicit request: the access token and what the response needs to send it to the client in the fragment of its redirect URI.Grants the legacy implicit request: after checking the client, its redirect URI, the user, the multi-factor policy, thestateand the scopes, it issues an access token (never a refresh token) through the token generator, stores the authorization (so the token can be introspected and revoked) and returns it for the response handler.Reads an authorization request withresponse_type=token.An authorization request of the legacy implicit flow (response_type=token), not yet authenticated: the request as the client sent it and the user the request arrived with.Registers the one client of the legacy implicit flow at start-up, when it does not exist yet: public, grantimplicitonly (no refresh token, no consent), one redirect URI, a restricted scope and audience and the lifetime of the flow.Enables the legacy implicit flow.The result of a legacy implicit request that was refused after its redirect URI had been checked, so the refusal is sent to the client in the fragment of the redirect URI.Settings of the legacy implicit flow, bound fromauthserver.legacy-implicit.*(seeapplication-legacy-implicit.yml).Adds the legacy implicit flow to the authorization endpoint: its converter first, its provider first and its response handler in place of the framework's (which it delegates to for an authorization code).Answers the authorization endpoint: for the two results of the legacy implicit flow it redirects with302to the registered redirect URI and carries the token, or the error, in its fragment (so it never reaches a server log as a query would); any other result is the framework's authorization code response and goes to the delegate.Builds the token generator of the legacy flow with the claims customizers of the server, so its tokens carry the same roles, tenant, audience and authentication claims as those of the other flows.