Class: AppleAuth::ServerIdentity

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_auth/server_identity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jwt) ⇒ ServerIdentity

Returns a new instance of ServerIdentity.



7
8
9
# File 'lib/apple_auth/server_identity.rb', line 7

def initialize(jwt)
  @jwt = jwt
end

Instance Attribute Details

#jwtObject (readonly)

Returns the value of attribute jwt.



5
6
7
# File 'lib/apple_auth/server_identity.rb', line 5

def jwt
  @jwt
end

Instance Method Details

#validate!Object



11
12
13
14
15
16
17
# File 'lib/apple_auth/server_identity.rb', line 11

def validate!
  token_data = JWTDecoder.new(jwt).call

  JWTServerConditions.new(token_data).validate!

  token_data.symbolize_keys
end