Method: Auth::ClientCredentials::Service#initialize

Defined in:
lib/lighthouse/auth/client_credentials/service.rb

#initialize(token_url, api_scopes, client_id, aud_claim_url, rsa_key, service_name = nil) ⇒ Service

rubocop:disable Metrics/ParameterLists

Parameters:

  • token_url (String)
    • URL of the token endpoint

  • api_scopes (Array)
    • List of requested API scopes

  • client_id (String)
    • ID used to identify the application

  • aud_claim_url (String)
    • The claim URL used as the ‘aud’ portion of the JWT

  • rsa_key (String)
    • RSA key used to encode the authentication JWT

  • service_name (String) (defaults to: nil)
    • name to use when caching access token in Redis (Optional)



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/lighthouse/auth/client_credentials/service.rb', line 22

def initialize(token_url, api_scopes, client_id, aud_claim_url, rsa_key, service_name = nil)
  @url = token_url
  @scopes = api_scopes
  @client_id = client_id
  @aud = aud_claim_url
  @rsa_key = rsa_key
  @service_name = service_name

  @tracker = AccessTokenTracker
  super()
end