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.authorization
An OAuth2 authorization server and OpenID Connect provider: the server that signs users in on behalf of clients and issues them tokens. The clients it knows, the grants it has made, its settings and keys, and the endpoints themselves.
Turned on with http.authorizationServer(...); see
AuthorizationServerConfigurer. A server
that does not call it carries none of this.
Types
class AuthorizationServerKeys | The keys an authorization server signs with. |
class AuthorizationServerSettings | Who the authorization server is and where its endpoints are. |
class ClientSettings | What is asked of one client beyond what OAuth2 asks of every client. |
class InMemoryOAuth2AuthorizationService | Grants kept in this process: gone when it stops, and unknown to any other. |
class InMemoryRegisteredClientRepository | Clients given when the server starts, and kept in this process. |
class JdbcOAuth2AuthorizationService | Grants kept in the server’s database, in the cn1_oauth2_authorization and cn1_oauth2_token tables of SecuritySchema: what lets tokens outlive a restart, and several processes be one authorization server. |
class JdbcRegisteredClientRepository | Clients kept in the server’s database, in the cn1_oauth2_registered_client table of SecuritySchema. |
class OAuth2Authorization | One grant: a user – or, for the device grant, nobody yet – having let one client act with some scopes. |
class OAuth2AuthorizationServer | The endpoints of an authorization server, each a method that takes a request and answers it. |
interface OAuth2AuthorizationService | Where an authorization server keeps the grants it has made and the secrets it issued under them. |
class OAuth2AuthorizationValidator | Checks a signed access token against its live authorization grant, including client-credentials grants. |
class OAuth2TokenContext | One token about to be signed, as an OAuth2TokenCustomizer sees it. |
interface OAuth2TokenCustomizer | Changes the claims of the tokens an authorization server signs: adds the user’s roles to an access token, a tenant to an ID token. |
interface OidcUserInfoMapper | What an authorization server says of a user: the claims of the /userinfo answer and of an ID token, beyond sub. |
class RegisteredClient | A client this authorization server issues tokens to. |
interface RegisteredClientRepository | The clients an authorization server knows. |
class TokenSettings | How long what is issued to one client lasts, in seconds. |