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.5.pre.lambda lib/osso/models/authorization_code.rb
osso-0.0.5.pre.kappa lib/osso/models/authorization_code.rb
osso-0.0.5.pre.iota lib/osso/models/authorization_code.rb
osso-0.0.5.pre.theta lib/osso/models/authorization_code.rb
osso-0.0.5.pre.eta lib/osso/models/authorization_code.rb
osso-0.0.5.pre.zeta lib/osso/models/authorization_code.rb
osso-0.0.5.pre.epsilon lib/osso/models/authorization_code.rb
osso-0.0.5.pre.delta lib/osso/models/authorization_code.rb
osso-0.0.5.pre.gamma lib/osso/models/authorization_code.rb
osso-0.0.5.pre.beta lib/osso/models/authorization_code.rb
osso-0.0.5.pre.alpha lib/osso/models/authorization_code.rb
osso-0.0.4 lib/osso/models/authorization_code.rb
osso-0.0.3.27 lib/osso/models/authorization_code.rb
osso-0.0.3.26 lib/osso/models/authorization_code.rb
osso-0.0.3.25 lib/osso/models/authorization_code.rb
osso-0.0.3.24 lib/osso/models/authorization_code.rb
osso-0.0.3.23 lib/osso/models/authorization_code.rb
osso-0.0.3.22 lib/osso/models/authorization_code.rb
osso-0.0.3.21 lib/osso/models/authorization_code.rb
osso-0.0.3.20 lib/osso/models/authorization_code.rb