Class OAuth2AuthenticationModule
java.lang.Object
com.kingsrook.qqq.backend.core.modules.authentication.implementations.OAuth2AuthenticationModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear cached OIDC provider metadata.createAutomatedSessionForUser(QInstance qInstance, Serializable userId) createSession(QInstance qInstance, Map<String, String> context) getLoginRedirectUrl(String originalUrl) booleanisSessionValid(QInstance instance, QSession session) voidLogout a session by deleting it from the database and clearing the memoization cache.boolean
-
Constructor Details
-
OAuth2AuthenticationModule
public OAuth2AuthenticationModule()
-
-
Method Details
-
createSession
public QSession createSession(QInstance qInstance, Map<String, String> context) throws QAuthenticationException- Specified by:
createSessionin interfaceQAuthenticationModuleInterface- Throws:
QAuthenticationException
-
isSessionValid
- Specified by:
isSessionValidin interfaceQAuthenticationModuleInterface
-
getLoginRedirectUrl
- Specified by:
getLoginRedirectUrlin interfaceQAuthenticationModuleInterface- Throws:
QAuthenticationException
-
createAutomatedSessionForUser
public QSession createAutomatedSessionForUser(QInstance qInstance, Serializable userId) throws QAuthenticationException - Specified by:
createAutomatedSessionForUserin interfaceQAuthenticationModuleInterface- Throws:
QAuthenticationException
-
usesSessionIdCookie
public boolean usesSessionIdCookie()- Specified by:
usesSessionIdCookiein interfaceQAuthenticationModuleInterface
-
logout
Logout a session by deleting it from the database and clearing the memoization cache.- Specified by:
logoutin interfaceQAuthenticationModuleInterface- Parameters:
qInstance- the QInstance (provided for implementations that need it)sessionUUID- the session UUID to invalidate
-
clearOIDCProviderMetadataCache
public static void clearOIDCProviderMetadataCache()Clear cached OIDC provider metadata. Primarily for testing purposes when WireMock servers restart on different ports between tests.
-