Sha256: e1a5ec2fb567957ed6ea0f3b81a0c0c5435d85d4dfd0b77253e4638243ea9875

Contents?: true

Size: 490 Bytes

Versions: 14

Compression:

Stored size: 490 Bytes

Contents

module Ipizza
  class AuthenticationResponse < Ipizza::Response
    
    def success?
      return ['3002'].include?(@params['VK_SERVICE'])
    end
    
    def valid?
      return @valid
    end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ipizza-1.0.0 lib/ipizza/authentication_response.rb
ipizza-0.7.1 lib/ipizza/authentication_response.rb
ipizza-0.6.1 lib/ipizza/authentication_response.rb
ipizza-0.5.5 lib/ipizza/authentication_response.rb
ipizza-0.5.4 lib/ipizza/authentication_response.rb
ipizza-0.5.3 lib/ipizza/authentication_response.rb
ipizza-0.5.2 lib/ipizza/authentication_response.rb
ipizza-0.5.1 lib/ipizza/authentication_response.rb
ipizza-0.5.0 lib/ipizza/authentication_response.rb
ipizza-0.4.4 lib/ipizza/authentication_response.rb
ipizza-0.4.3 lib/ipizza/authentication_response.rb
ipizza-0.4.2 lib/ipizza/authentication_response.rb
ipizza-0.4.1 lib/ipizza/authentication_response.rb
ipizza-0.4.0 lib/ipizza/authentication_response.rb