Sha256: 673550cb3182481254bbc5696fe1933062a24d94c6d626b7f1345a2ba0f38032
Contents?: true
Size: 603 Bytes
Versions: 10
Compression:
Stored size: 603 Bytes
Contents
# frozen_string_literal: true module Warden module JWTAuth # Revokes a JWT using configured revocation strategy class TokenRevoker include JWTAuth::Import['revocation_strategies'] # Revokes the JWT token # # @param token [String] a JWT def call(token) payload = TokenDecoder.new.call(token) scope = payload['scp'].to_sym user = PayloadUserHelper.find_user(payload) revocation_strategies[scope].revoke_jwt(payload, user) # rubocop:disable Lint/HandleExceptions rescue JWT::ExpiredSignature end end end end
Version data entries
10 entries across 10 versions & 1 rubygems