Class: TokenAuth::AuthenticationToken

Inherits:
ApplicationRecord show all
Defined in:
app/models/token_auth/authentication_token.rb

Overview

A key shared with a client for authenticating requests.

Constant Summary collapse

TOKEN_LENGTH =
32
UUID_LENGTH =
36

Class Method Summary collapse

Class Method Details

.find_enabled(client_uuid:, value:) ⇒ Object



17
18
19
# File 'app/models/token_auth/authentication_token.rb', line 17

def self.find_enabled(client_uuid:, value:)
  find_by(client_uuid: client_uuid, value: value, is_enabled: true)
end