Class OAuth2AuthenticationModule

java.lang.Object
com.kingsrook.qqq.backend.core.modules.authentication.implementations.OAuth2AuthenticationModule
All Implemented Interfaces:
QAuthenticationModuleInterface

public class OAuth2AuthenticationModule extends Object implements QAuthenticationModuleInterface
Implementation of OAuth2 authentication. Sessions are stored in the userSession table (keyed by a uuid, which is what the client holds, in a cookie). If the provider issues a refresh token (e.g., the offline_access scope was granted) and the instance defines the refresh- token table (see UserSessionRefreshTokenMetaDataProducer), the refresh token is stored server-side and used to renew the access token when it expires (or is within refreshTokenSkewSeconds of expiring), so the session survives. Refresh tokens are never sent to clients, put on the QSession, or logged, and are stored encrypted (AES-256-GCM, bound to their session - see RefreshTokenCipher) with a key from refreshTokenEncryptionKey (#1048).