Search in sources :

Example 1 with JwtAuthenticationToken

use of org.thingsboard.server.service.security.auth.JwtAuthenticationToken in project thingsboard by thingsboard.

the class JwtAuthenticationProvider method authenticate.

@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
    RawAccessJwtToken rawAccessToken = (RawAccessJwtToken) authentication.getCredentials();
    SecurityUser securityUser = tokenFactory.parseAccessJwtToken(rawAccessToken);
    return new JwtAuthenticationToken(securityUser);
}
Also used : SecurityUser(org.thingsboard.server.service.security.model.SecurityUser) JwtAuthenticationToken(org.thingsboard.server.service.security.auth.JwtAuthenticationToken) RawAccessJwtToken(org.thingsboard.server.service.security.model.token.RawAccessJwtToken)

Aggregations

JwtAuthenticationToken (org.thingsboard.server.service.security.auth.JwtAuthenticationToken)1 SecurityUser (org.thingsboard.server.service.security.model.SecurityUser)1 RawAccessJwtToken (org.thingsboard.server.service.security.model.token.RawAccessJwtToken)1