Sha256: 2d20bd3f5a51ce8580d1bf36c710bb806f524877d631e0f319c190524aa17dd4

Contents?: true

Size: 643 Bytes

Versions: 15

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

module WorkOS
  # The RefreshAuthenticationResponse contains response data from a successful
  # `UserManagement.authenticate_with_refresh_token` call
  class RefreshAuthenticationResponse
    include HashProvider

    attr_accessor :access_token, :refresh_token

    def initialize(authentication_response_json)
      json = JSON.parse(authentication_response_json, symbolize_names: true)
      @access_token = json[:access_token]
      @refresh_token = json[:refresh_token]
    end

    def to_json(*)
      {
        access_token: access_token,
        refresh_token: refresh_token,
      }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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