Package alpine.auth

Class JwtAuthenticationService

  • All Implemented Interfaces:
    AuthenticationService

    public class JwtAuthenticationService
    extends Object
    implements AuthenticationService
    An AuthenticationService implementation for JWTs that authenticates users based on a token presented in the request. Tokens must be presented using the Authorization Bearer header.
    Since:
    1.0.0
    Author:
    Steve Springett
    • Constructor Detail

      • JwtAuthenticationService

        public JwtAuthenticationService​(org.glassfish.jersey.server.ContainerRequest request)
        Constructs a new JwtAuthenticationService.
        Parameters:
        request - a ContainerRequest object to parse
    • Method Detail

      • isSpecified

        public boolean isSpecified()
        Defines a method which returns if the specified piece of data, required to perform authentication is present.
        Specified by:
        isSpecified in interface AuthenticationService
        Returns:
        true if the authentication data was specified, false if not