Sha256: 4cc6e35770a2ed66c4de347c2f50af0231ed34e36b1f5af3a02ea6943645394b

Contents?: true

Size: 841 Bytes

Versions: 30

Compression:

Stored size: 841 Bytes

Contents

# frozen_string_literal: true

module Osso
  module Models
    class AuthorizationCode < ActiveRecord::Base
      include OAuth2Token

      def access_token
        @access_token ||= expired! &&
          user.access_tokens.create(oauth_client: oauth_client)
      end
    end
  end
end

# == Schema Information
#
# Table name: authorization_codes
#
#  id              :uuid             not null, primary key
#  token           :string
#  redirect_uri    :string
#  expires_at      :datetime
#  created_at      :datetime         not null
#  updated_at      :datetime         not null
#  user_id         :uuid
#  oauth_client_id :uuid
#
# Indexes
#
#  index_authorization_codes_on_oauth_client_id  (oauth_client_id)
#  index_authorization_codes_on_token            (token) UNIQUE
#  index_authorization_codes_on_user_id          (user_id)
#

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
osso-0.0.3.19 lib/osso/models/authorization_code.rb
osso-0.0.3.18 lib/osso/models/authorization_code.rb
osso-0.0.3.17 lib/osso/models/authorization_code.rb
osso-0.0.3.16 lib/osso/models/authorization_code.rb
osso-0.0.3.15 lib/osso/models/authorization_code.rb
osso-0.0.3.14 lib/osso/models/authorization_code.rb
osso-0.0.3.13 lib/osso/models/authorization_code.rb
osso-0.0.3.12 lib/osso/models/authorization_code.rb
osso-0.0.3.11 lib/osso/models/authorization_code.rb
osso-0.0.3.9 lib/osso/models/authorization_code.rb