class Virgil::Jwt::TokenContext

Provides payload for access token providers

Attributes

force_reload[R]

You can set up token cache in {CallbackJwtProvider#obtain_access_token_proc} and reset cached token if True. @return [TrueClass] or [FalseClass]

identity[R]

Identity that should be used in access token. @return [String]

operation[R]

Operation for which token is needed. @return [String]

service[R]

Service for which token is needed. @return [String]

Public Class Methods

new(operation:, identity:, service: nil, force_reload: false) click to toggle source

Initializes a new instance of the class @param operation [String] Operation for which token is needed @param identity [String] Identity to use in token @param force_reload [TrueClass] or [FalseClass] If you set up token cache in {CallbackJwtProvider#obtain_access_token_proc} it should reset cached token and return new if TRUE.

# File lib/virgil/jwt/token_context.rb, line 64
def initialize(operation:, identity:, service: nil, force_reload: false)
  @operation = operation
  @identity = identity
  @service = service
  @force_reload = force_reload
end