Interface AuthorizationRequestRepository<T extends OAuth2AuthorizationRequest>
- Type Parameters:
T
- The type of OAuth 2.0 Authorization Request
- All Known Implementing Classes:
HttpSessionOAuth2AuthorizationRequestRepository
public interface AuthorizationRequestRepository<T extends OAuth2AuthorizationRequest>
Implementations of this interface are responsible for the persistence of
OAuth2AuthorizationRequest
between requests.
Used by the OAuth2AuthorizationRequestRedirectFilter
for persisting the
Authorization Request before it initiates the authorization code grant flow. As well,
used by the OAuth2LoginAuthenticationFilter
for resolving the associated
Authorization Request when handling the callback of the Authorization Response.
- Since:
- 5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionloadAuthorizationRequest
(jakarta.servlet.http.HttpServletRequest request) Returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
ornull
if not available.removeAuthorizationRequest
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
andHttpServletResponse
or if not available returnsnull
.void
saveAuthorizationRequest
(T authorizationRequest, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Persists theOAuth2AuthorizationRequest
associating it to the providedHttpServletRequest
and/orHttpServletResponse
.
-
Method Details
-
loadAuthorizationRequest
Returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
ornull
if not available.- Parameters:
request
- theHttpServletRequest
- Returns:
- the
OAuth2AuthorizationRequest
ornull
if not available
-
saveAuthorizationRequest
void saveAuthorizationRequest(T authorizationRequest, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Persists theOAuth2AuthorizationRequest
associating it to the providedHttpServletRequest
and/orHttpServletResponse
.- Parameters:
authorizationRequest
- theOAuth2AuthorizationRequest
request
- theHttpServletRequest
response
- theHttpServletResponse
-
removeAuthorizationRequest
T removeAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
andHttpServletResponse
or if not available returnsnull
.- Parameters:
request
- theHttpServletRequest
response
- theHttpServletResponse
- Returns:
- the
OAuth2AuthorizationRequest
ornull
if not available - Since:
- 5.1
-