Class: OauthTokenVerifier::Providers::Google

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth_token_verifier/providers/google.rb

Defined Under Namespace

Classes: BaseFields

Instance Method Summary collapse

Constructor Details

#initializeGoogle

Returns a new instance of Google.



8
9
10
# File 'lib/oauth_token_verifier/providers/google.rb', line 8

def initialize
  @data_fields = Struct.new(*config.fields_mapping.values)
end

Instance Method Details

#verify_token(context) ⇒ Object



12
13
14
15
16
# File 'lib/oauth_token_verifier/providers/google.rb', line 12

def verify_token(context)
  uri = build_uri(context.token)
  response = check_response(uri)
  parse_response(response)
end