Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

package com.codename1.backend.security.oauth2.server.resource

A server whose routes are reached with a bearer token (RFC 6750): finding the token in a request, verifying it as a JWT, turning its claims into who is calling and what they may do, and answering a request whose token is missing, bad or not enough.

Turned on with http.oauth2ResourceServer(...); see OAuth2ResourceServerConfigurer.

Types

class BearerTokenAccessDeniedHandlerAnswers a request whose token is good and does not grant what the request needs, as RFC 6750 3.1 says to:
class BearerTokenAuthenticationEntryPointAnswers a request that needs a bearer token and has none, or has a bad one, as RFC 6750 3 says to:
class BearerTokenAuthenticationTokenA bearer token as it came off a request: nobody yet, until something that can verify it says who.
class BearerTokenErrorAn error a request with a bearer token is answered with (RFC 6750 3.1): the code, the status it is sent under, and the scope it would have needed.
class BearerTokenErrorsThe three errors of RFC 6750 3.1.
interface BearerTokenResolverFinds the bearer token in a request.
class DefaultBearerTokenResolverFinds the token in the Authorization: Bearer header.
class InvalidBearerTokenExceptionThe bearer token of a request was looked at and refused; the message is why.
class JwtAuthenticationConverterMakes the JwtAuthenticationToken of a verified token: its authorities, through a JwtGrantedAuthoritiesConverter unless another is set, and its name, from the sub claim unless another is named.
class JwtAuthenticationProviderAuthenticates a bearer token by verifying it as a JWT.
class JwtAuthenticationTokenWho a request is from, when a verified JWT says so.
class JwtGrantedAuthoritiesConverterReads a token’s authorities out of one claim: each value, with a prefix in front.
class JwtIssuerAuthenticationManagerResolverFor a server that takes tokens from several issuers: each token is verified by the issuer it says it is from, and only by that one.