Class: StandardId::Passwordless::VerificationService::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/standard_id/passwordless/verification_service.rb

Overview

Result object returned by .verify.

  • success?: true/false

  • account: the resolved account (nil on failure)

  • challenge: the consumed CodeChallenge (nil on failure)

  • error: human-readable error message string (nil on success)

  • error_code: machine-readable symbol (nil on success) One of :invalid_code, :expired, :max_attempts, :not_found, :blank_code, :account_not_found, :server_error

  • attempts: nil on success, 0 when no challenge was found (fabricated target), or 1+ for wrong-code failures against an active challenge

Instance Attribute Summary collapse

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account

Returns:

  • (Object)

    the current value of account



14
15
16
# File 'lib/standard_id/passwordless/verification_service.rb', line 14

def 
  @account
end

#attemptsObject (readonly)

Returns the value of attribute attempts

Returns:

  • (Object)

    the current value of attempts



14
15
16
# File 'lib/standard_id/passwordless/verification_service.rb', line 14

def attempts
  @attempts
end

#challengeObject (readonly)

Returns the value of attribute challenge

Returns:

  • (Object)

    the current value of challenge



14
15
16
# File 'lib/standard_id/passwordless/verification_service.rb', line 14

def challenge
  @challenge
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



14
15
16
# File 'lib/standard_id/passwordless/verification_service.rb', line 14

def error
  @error
end

#error_codeObject (readonly)

Returns the value of attribute error_code

Returns:

  • (Object)

    the current value of error_code



14
15
16
# File 'lib/standard_id/passwordless/verification_service.rb', line 14

def error_code
  @error_code
end

#success?Object (readonly)

Returns the value of attribute success?

Returns:

  • (Object)

    the current value of success?



14
15
16
# File 'lib/standard_id/passwordless/verification_service.rb', line 14

def success?
  @success?
end