Class DefaultServerOAuth2AuthorizationRequestResolver

    • Constructor Detail

      • DefaultServerOAuth2AuthorizationRequestResolver

        public DefaultServerOAuth2AuthorizationRequestResolver​(ReactiveClientRegistrationRepository clientRegistrationRepository)
        Creates a new instance
        Parameters:
        clientRegistrationRepository - the repository to resolve the ClientRegistration
      • DefaultServerOAuth2AuthorizationRequestResolver

        public DefaultServerOAuth2AuthorizationRequestResolver​(ReactiveClientRegistrationRepository clientRegistrationRepository,
                                                               org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher authorizationRequestMatcher)
        Creates a new instance
        Parameters:
        clientRegistrationRepository - the repository to resolve the ClientRegistration
        authorizationRequestMatcher - the matcher that determines if the request is a match and extracts the DEFAULT_REGISTRATION_ID_URI_VARIABLE_NAME from the path variables.
    • Method Detail

      • resolve

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

        public reactor.core.publisher.Mono<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> resolve​(org.springframework.web.server.ServerWebExchange exchange,
                                                                                                                                 java.lang.String clientRegistrationId)
        Description copied from interface: ServerOAuth2AuthorizationRequestResolver
        Returns the OAuth2AuthorizationRequest resolved from the provided HttpServletRequest or null if not available.
        Specified by:
        resolve in interface ServerOAuth2AuthorizationRequestResolver
        Parameters:
        exchange - the ServerWebExchange
        clientRegistrationId - the client registration id
        Returns:
        the resolved OAuth2AuthorizationRequest or null if not available
      • setAuthorizationRequestCustomizer

        public final void setAuthorizationRequestCustomizer​(java.util.function.Consumer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder> authorizationRequestCustomizer)
        Sets the Consumer to be provided the OAuth2AuthorizationRequest.Builder allowing for further customizations.
        Parameters:
        authorizationRequestCustomizer - the Consumer to be provided the OAuth2AuthorizationRequest.Builder
        Since:
        5.3