Class: Ipizza::AuthenticationResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/ipizza/authentication_response.rb

Instance Attribute Summary

Attributes inherited from Response

#verify_params, #verify_params_order

Instance Method Summary collapse

Methods inherited from Response

#initialize, #verify

Constructor Details

This class inherits a constructor from Ipizza::Response

Instance Method Details

#authentication_infoObject



12
13
14
# File 'lib/ipizza/authentication_response.rb', line 12

def authentication_info
  @params['VK_INFO']
end

#info_nameObject



20
21
22
# File 'lib/ipizza/authentication_response.rb', line 20

def info_name
  /NIMI:([^;.]+)/.match(@params['VK_INFO'])[1] if @params['VK_INFO']
end

#info_social_security_idObject



16
17
18
# File 'lib/ipizza/authentication_response.rb', line 16

def info_social_security_id
  /ISIK:([^;.]+)/i.match(@params['VK_INFO'])[1] if @params['VK_INFO']
end

#success?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/ipizza/authentication_response.rb', line 4

def success?
  return ['3002'].include?(@params['VK_SERVICE'])
end

#valid?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/ipizza/authentication_response.rb', line 8

def valid?
  return @valid
end