Method: ADAL::AuthenticationContext#initialize

Defined in:
lib/adal/authentication_context.rb

#initialize(authority_host = Authority::WORLD_WIDE_AUTHORITY, tenant = Authority::COMMON_TENANT, options = {}) ⇒ AuthenticationContext

Creates a new AuthenticationContext.

Parameters:

  • String

    authority_host The host name of the authority to verify against, e.g. ‘login.windows.net’.

  • String

    tenant The tenant to authenticate to, e.g. ‘contoso.onmicrosoft.com’.



55
56
57
58
59
60
61
62
# File 'lib/adal/authentication_context.rb', line 55

def initialize(authority_host = Authority::WORLD_WIDE_AUTHORITY,
               tenant = Authority::COMMON_TENANT,
               options = {})
  fail_if_arguments_nil(authority_host, tenant)
  validate_authority = options[:validate_authority] || false
  @authority = Authority.new(authority_host, tenant, validate_authority)
  @token_cache = options[:token_cache] || MemoryCache.new
end