Class TokenAuthenticationSecurity

java.lang.Object
org.apereo.cas.token.authentication.TokenAuthenticationSecurity

public class TokenAuthenticationSecurity extends Object
Since:
7.0.0
  • Method Details

    • generateTokenFor

      public String generateTokenFor(org.apereo.cas.authentication.Authentication authentication)
      Generate a token for authentication.
      Parameters:
      authentication - the authentication
      Returns:
      the string
    • validateToken

      public org.pac4j.core.profile.UserProfile validateToken(String token)
      Validate the token and build the user profile.
      Parameters:
      token - the token
      Returns:
      the user profile
    • forRegisteredService

      public static TokenAuthenticationSecurity forRegisteredService(org.apereo.cas.services.RegisteredService registeredService)
      Create a token security instance for a registered service.
      Parameters:
      registeredService - the service
      Returns:
      the token authentication security
    • toGenerator

      public org.pac4j.jwt.profile.JwtGenerator toGenerator()
      Create a JWT generator.
      Returns:
      the jwt generator
    • toAuthenticator

      public org.pac4j.jwt.credentials.authenticator.JwtAuthenticator toAuthenticator()
      Create a JWT authenticator.
      Returns:
      the jwt authenticator