Class JWTAuthentication

java.lang.Object
com.erudika.para.server.security.UserAuthentication
com.erudika.para.server.security.JWTAuthentication
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication

public class JWTAuthentication extends UserAuthentication
Represents a user authentication with JWT.
Author:
Alex Bogdanovski [[email protected]]
See Also:
  • Constructor Details

    • JWTAuthentication

      public JWTAuthentication(AuthenticatedUserDetails principal)
      Default constructor.
      Parameters:
      principal - a user object
  • Method Details

    • withJWT

      public JWTAuthentication withJWT(com.nimbusds.jwt.SignedJWT jwt)
      Parameters:
      jwt - token
      Returns:
      this
    • withApp

      public JWTAuthentication withApp(App app)
      Parameters:
      app - App
      Returns:
      this
    • getJwt

      public com.nimbusds.jwt.SignedJWT getJwt()
      Returns:
      the JWT token
    • getApp

      public App getApp()
      Returns:
      the App