Class WebSessionOAuth2ServerAuthorizationRequestRepository

java.lang.Object
org.springframework.security.oauth2.client.web.server.WebSessionOAuth2ServerAuthorizationRequestRepository
All Implemented Interfaces:
ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>

public final class WebSessionOAuth2ServerAuthorizationRequestRepository extends Object implements ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
An implementation of an ServerAuthorizationRequestRepository that stores OAuth2AuthorizationRequest in the WebSession.
Since:
5.1
See Also:
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
    loadAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
    Returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest or null if not available.
    reactor.core.publisher.Mono<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
    removeAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
    Removes and returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest or if not available returns null.
    reactor.core.publisher.Mono<Void>
    saveAuthorizationRequest(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest, org.springframework.web.server.ServerWebExchange exchange)
    Persists the OAuth2AuthorizationRequest associating it to the provided HttpServletRequest and/or HttpServletResponse.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebSessionOAuth2ServerAuthorizationRequestRepository

      public WebSessionOAuth2ServerAuthorizationRequestRepository()
  • Method Details

    • loadAuthorizationRequest

      public reactor.core.publisher.Mono<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> loadAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
      Description copied from interface: ServerAuthorizationRequestRepository
      Returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest or null if not available.
      Specified by:
      loadAuthorizationRequest in interface ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
      Parameters:
      exchange - the ServerWebExchange
      Returns:
      the OAuth2AuthorizationRequest or null if not available
    • saveAuthorizationRequest

      public reactor.core.publisher.Mono<Void> saveAuthorizationRequest(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest, org.springframework.web.server.ServerWebExchange exchange)
      Description copied from interface: ServerAuthorizationRequestRepository
      Persists the OAuth2AuthorizationRequest associating it to the provided HttpServletRequest and/or HttpServletResponse.
      Specified by:
      saveAuthorizationRequest in interface ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
      Parameters:
      authorizationRequest - the OAuth2AuthorizationRequest
      exchange - the ServerWebExchange
    • removeAuthorizationRequest

      public reactor.core.publisher.Mono<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> removeAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
      Description copied from interface: ServerAuthorizationRequestRepository
      Removes and returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest or if not available returns null.
      Specified by:
      removeAuthorizationRequest in interface ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
      Parameters:
      exchange - the ServerWebExchange
      Returns:
      the removed OAuth2AuthorizationRequest or null if not available