Class AuthenticationWebSocketInterceptor
java.lang.Object
org.springframework.graphql.server.support.AbstractAuthenticationWebSocketInterceptor
org.springframework.graphql.server.webmvc.AuthenticationWebSocketInterceptor
- All Implemented Interfaces:
- WebGraphQlInterceptor,- WebSocketGraphQlInterceptor
public final class AuthenticationWebSocketInterceptor
extends AbstractAuthenticationWebSocketInterceptor
Extension of 
AbstractAuthenticationWebSocketInterceptor for use with
 the WebMVC GraphQL transport.- Since:
- 1.3.0
- Author:
- Joshua Cummings, Rossen Stoyanchev
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.graphql.server.WebGraphQlInterceptorWebGraphQlInterceptor.Chain
- 
Constructor SummaryConstructorsConstructorDescriptionAuthenticationWebSocketInterceptor(AuthenticationExtractor authExtractor, org.springframework.security.authentication.AuthenticationManager authManager) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<org.springframework.security.core.Authentication>authenticate(org.springframework.security.core.Authentication authentication) Subclasses implement this method to return an authenticatedSecurityContextor an error.protected reactor.util.context.ContextViewgetContextToWrite(org.springframework.security.core.context.SecurityContext securityContext) Subclasses implement this to decide how to insert theSecurityContextinto the Reactor context of theWebSocketGraphQlInterceptorchain.Methods inherited from class org.springframework.graphql.server.support.AbstractAuthenticationWebSocketInterceptorhandleConnectionInitialization, interceptMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.graphql.server.WebGraphQlInterceptorandThen, applyMethods inherited from interface org.springframework.graphql.server.WebSocketGraphQlInterceptorhandleCancelledSubscription, handleConnectionClosed
- 
Constructor Details- 
AuthenticationWebSocketInterceptorpublic AuthenticationWebSocketInterceptor(AuthenticationExtractor authExtractor, org.springframework.security.authentication.AuthenticationManager authManager) 
 
- 
- 
Method Details- 
authenticateprotected reactor.core.publisher.Mono<org.springframework.security.core.Authentication> authenticate(org.springframework.security.core.Authentication authentication) Description copied from class:AbstractAuthenticationWebSocketInterceptorSubclasses implement this method to return an authenticatedSecurityContextor an error.- Specified by:
- authenticatein class- AbstractAuthenticationWebSocketInterceptor
- Parameters:
- authentication- the authentication value extracted from the payload
 
- 
getContextToWriteprotected reactor.util.context.ContextView getContextToWrite(org.springframework.security.core.context.SecurityContext securityContext) Description copied from class:AbstractAuthenticationWebSocketInterceptorSubclasses implement this to decide how to insert theSecurityContextinto the Reactor context of theWebSocketGraphQlInterceptorchain.- Specified by:
- getContextToWritein class- AbstractAuthenticationWebSocketInterceptor
- Parameters:
- securityContext- the- SecurityContextto write to the context
 
 
-