Sha256: f795ab9604d73368b0cea24753e61acaf1bc8e55cf306830329313af31674c08

Contents?: true

Size: 695 Bytes

Versions: 5

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

module AuthRails
  module Configuration
    class Jwt
      class << self
        attr_accessor :strategy

        def access_token
          yield AccessToken

          AccessToken.algorithm ||= 'HS256'
        end

        def refresh_token
          yield RefreshToken

          RefreshToken.cookie_key ||= :ref_tok
        end
      end

      class AccessToken
        class << self
          attr_accessor :exp,
                        :algorithm,
                        :secret_key
        end
      end

      class RefreshToken < AccessToken
        class << self
          attr_accessor :http_only, :cookie_key
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
auth_rails-1.1.2 lib/auth_rails/configuration/jwt.rb
auth_rails-1.1.1 lib/auth_rails/configuration/jwt.rb
auth_rails-1.1.0 lib/auth_rails/configuration/jwt.rb
auth_rails-1.0.2 lib/auth_rails/configuration/jwt.rb
auth_rails-1.0.0 lib/auth_rails/configuration/jwt.rb