Class: OmniAuth::Strategies::Apple

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/apple.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#id_tokenObject (readonly)

Returns the value of attribute id_token.



7
8
9
# File 'lib/omniauth/strategies/apple.rb', line 7

def id_token
  @id_token
end

Instance Method Details

#build_access_tokenObject



31
32
33
34
35
# File 'lib/omniauth/strategies/apple.rb', line 31

def build_access_token
  _access_token = super
  @id_token = ::JSON::JWT.decode(_access_token.params['id_token'], :skip_verification)
  _access_token
end

#callback_urlObject



27
28
29
# File 'lib/omniauth/strategies/apple.rb', line 27

def callback_url
  full_host + script_name + callback_path
end

#clientObject



23
24
25
# File 'lib/omniauth/strategies/apple.rb', line 23

def client
  ::OAuth2::Client.new(options.client_id, client_secret, deep_symbolize(options.client_options))
end