class
   OAuth2::Provider::AccessToken
  
  - OAuth2::Provider::AccessToken
 - Reference
 - Object
 
Included Modules
Extended Modules
Defined in:
models/oauth2/provider/access_token.crClass Method Summary
- 
        .find_by_token?(token : String)
        
          
Finds an access token given its token string.
 
Instance Method Summary
- #_association_account
 - #_association_client
 - #_belongs_to_setter_for_account(account_ : Account, update_associations = true) : Account
 - #_belongs_to_setter_for_client(client_ : Client, update_associations = true) : Client
 - #account(include_deleted : Bool = false, include_undone : Bool = false) : Account
 - #account=(account_ : Account) : Account
 - #account?(include_deleted : Bool = false, include_undone : Bool = false) : Account | Nil
 - 
        #account_id : Int64 | Nil
        
          
The account ID.
 - 
        #account_id=(account_id : Int64 | Nil)
        
          
The account ID.
 - #client(include_deleted : Bool = false, include_undone : Bool = false) : Client
 - #client=(client_ : Client) : Client
 - #client?(include_deleted : Bool = false, include_undone : Bool = false) : Client | Nil
 - 
        #client_id : Int64 | Nil
        
          
The client application ID.
 - 
        #client_id=(client_id : Int64 | Nil)
        
          
The client application ID.
 - 
        #expires_at : Time
        
          
The expiration.
 - 
        #expires_at=(expires_at : Time)
        
          
The expiration.
 - 
        #has_mcp_scope?
        
          
Checks if the access token has "mcp" scope.
 - 
        #scope : String
        
          
Scopes.
 - 
        #scope=(scope : String)
        
          
Scopes.
 - 
        #token : String
        
          
The access token string.
 - 
        #token=(token : String)
        
          
The access token string.
 - 
        #valid?
        
          
Checks if the access token is valid (not expired).
 
Instance methods inherited from module Ktistec::Model::Common
  
  
    
      created_at : Time
    created_at, 
    
  
    
      created_at=(created_at : Time)
    created_at=, 
    
  
    
      updated_at : Time
    updated_at, 
    
  
    
      updated_at=(updated_at : Time)
    updated_at=
    
  
      
      
      
    
      
  Instance methods inherited from module Ktistec::Model
  
  
    
      ==(other : self)==(other) ==, _run_validations _run_validations, _save_model(skip_validation = false) _save_model, _serialize_graph(nodes, association = nil, index = nil, skip_associated = false) _serialize_graph, assign(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
assign(*, _strict : Bool = false, **properties) assign, changed!(*properties : Symbol) changed!, changed?
changed?(*properties : Symbol) changed?, clear_changed!
clear_changed!(*properties : Symbol) clear_changed!, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, id : Int64 | Nil id, id=(id : Int64 | Nil) id=, inspect(io : IO) inspect, new_record? new_record?, reload! reload!, save(skip_validation = false, skip_associated = false) save, serialize_graph(skip_associated = false) serialize_graph, table_name table_name, to_h to_h, to_json(json : JSON::Builder) to_json, to_s(io : IO) to_s, update_property(property, value) update_property, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate
Constructor methods inherited from module Ktistec::Model
  
  
    
      new(properties : Hash(String, Any), *, _strict : Bool = false) forall Anynew(*, _strict : Bool = false, **properties) new
Macros inherited from module Ktistec::Model
  
  
    
      belongs_to(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
    belongs_to, 
    
  
    
      derived(decl, *, aliased_to)
    derived, 
    
  
    
      has_many(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
    has_many, 
    
  
    
      has_one(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
    has_one, 
    
  
    
      validates(property, &block)
    validates
    
  
    
      
      
      
      
    
      
      
      
      
    
  Class Method Detail
Instance Method Detail
The account ID.
Links the access token to the Account model. It identifies
which user the token represents.
The account ID.
Links the access token to the Account model. It identifies
which user the token represents.
The client application ID.
Links the access token to the OAuth2 Client model. It
identifies which application this token was issued to.
The client application ID.
Links the access token to the OAuth2 Client model. It
identifies which application this token was issued to.
The expiration.
A timestamp that indicates when the access token becomes invalid.
The expiration.
A timestamp that indicates when the access token becomes invalid.
Scopes.
Stores the specific permissions that the user granted when they authorized the application.
Scopes.
Stores the specific permissions that the user granted when they authorized the application.
The access token string.
This is a unique, randomly generated, and unguessable value
that the client application uses to authenticate its requests
to the server. The client sends this token in the
Authorization header of an API request.
The access token string.
This is a unique, randomly generated, and unguessable value
that the client application uses to authenticate its requests
to the server. The client sends this token in the
Authorization header of an API request.