Sha256: c424f8ea0de835664154e64d26bf2b2a8e6ec280b0a844e041fcb6d624230d29

Contents?: true

Size: 506 Bytes

Versions: 18

Compression:

Stored size: 506 Bytes

Contents

# frozen_string_literal: true

module WorkOS
  # The VerifyChallenge class provides a lightweight wrapper around
  # a WorkOS Authentication Challenge resource.
  class VerifyChallenge
    include HashProvider

    attr_accessor :challenge, :valid

    def initialize(json)
      hash = JSON.parse(json, symbolize_names: true)

      @challenge = hash[:challenge]
      @valid = hash[:valid]
    end

    def to_json(*)
      {
        challenge: challenge,
        valid: valid,
      }
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
workos-5.9.0 lib/workos/verify_challenge.rb
workos-5.8.0 lib/workos/verify_challenge.rb
workos-5.7.0 lib/workos/verify_challenge.rb
workos-5.6.0 lib/workos/verify_challenge.rb
workos-5.5.1 lib/workos/verify_challenge.rb
workos-5.5.0 lib/workos/verify_challenge.rb
workos-5.4.0 lib/workos/verify_challenge.rb
workos-5.3.0 lib/workos/verify_challenge.rb
workos-5.2.1 lib/workos/verify_challenge.rb
workos-5.2.0 lib/workos/verify_challenge.rb
workos-5.1.0 lib/workos/verify_challenge.rb
workos-5.0.0 lib/workos/verify_challenge.rb
workos-4.8.0 lib/workos/verify_challenge.rb
workos-4.5.0 lib/workos/verify_challenge.rb
workos-4.4.0 lib/workos/verify_challenge.rb
workos-4.3.0 lib/workos/verify_challenge.rb
workos-4.2.1 lib/workos/verify_challenge.rb
workos-4.2.0 lib/workos/verify_challenge.rb