Class BearerTokenWebSocketAuthenticator
java.lang.Object
org.qubership.atp.auth.springbootstarter.services.BearerTokenWebSocketAuthenticator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(String tokenString) Authenticate web socket.org.keycloak.representations.AccessTokenverifyAndGetAccessToken(String tokenString, org.keycloak.adapters.KeycloakDeployment deployment)
-
Constructor Details
-
BearerTokenWebSocketAuthenticator
public BearerTokenWebSocketAuthenticator()
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(String tokenString) throws org.springframework.security.core.AuthenticationException Authenticate web socket. see https://stackoverflow.com/questions/50573461/spring-websockets-authentication-with-spring-security-and-keycloak- Parameters:
tokenString- the token string- Returns:
- the authentication
- Throws:
org.springframework.security.core.AuthenticationException- the authentication exception
-
verifyAndGetAccessToken
public org.keycloak.representations.AccessToken verifyAndGetAccessToken(String tokenString, org.keycloak.adapters.KeycloakDeployment deployment) throws org.keycloak.common.VerificationException - Throws:
org.keycloak.common.VerificationException
-