Class: AppleID::Client

Inherits:
OpenIDConnect::Client
  • Object
show all
Defined in:
lib/apple_id/client.rb

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
12
13
14
# File 'lib/apple_id/client.rb', line 7

def initialize(attributes)
  attributes_with_default = {
    authorization_endpoint: File.join(ISSUER, '/auth/authorize'),
    token_endpoint:         File.join(ISSUER, '/auth/token'),
    revocation_endpoint:    File.join(ISSUER, '/auth/revoke'),
  }.merge(attributes)
  super attributes_with_default
end

Instance Method Details

#access_token!(options = {}) ⇒ Object



16
17
18
19
# File 'lib/apple_id/client.rb', line 16

def access_token!(options = {})
  self.secret = client_secret_jwt
  super :body, options
end

#revoke!(options = {}) ⇒ Object



21
22
23
24
# File 'lib/apple_id/client.rb', line 21

def revoke!(options = {})
  self.secret = client_secret_jwt
  super :body, options
end