Sha256: ae57323d5bd601483823823f9cd948001edd7febf52634e587520e07ca8d84a4
Contents?: true
Size: 610 Bytes
Versions: 9
Compression:
Stored size: 610 Bytes
Contents
# frozen_string_literal: true require 'active_support/concern' module Devise module Models # Model that will be authenticatable with the JWT strategy # # @see [Warden::JWTAuth::Interfaces::UserRepository] # @see [Warden::JWTAuth::Interfaces::User] module JwtAuthenticatable extend ActiveSupport::Concern class_methods do Devise::Models.config(self, :jwt_revocation_strategy) end included do def self.find_for_jwt_authentication(sub) find_by(id: sub) end end def jwt_subject id end end end end
Version data entries
9 entries across 9 versions & 1 rubygems