Class: Tanker::CTanker::COIDCAuthorizationCodeVerification

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/tanker/c_tanker/c_verification.rb

Instance Method Summary collapse

Constructor Details

#initialize(provider_id, authorization_code, state) ⇒ COIDCAuthorizationCodeVerification

Returns a new instance of COIDCAuthorizationCodeVerification.



69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/tanker/c_tanker/c_verification.rb', line 69

def initialize(provider_id, authorization_code, state)
  super()

  # NOTE: Instance variables are required to keep the CStrings alive
  @provider_id = CTanker.new_cstring provider_id
  @authorization_code = CTanker.new_cstring authorization_code
  @state = CTanker.new_cstring state

  self[:version] = 1
  self[:provider_id] = @provider_id
  self[:authorization_code] = @authorization_code
  self[:state] = @state
end