Sha256: 51e2870e0b9f83a8e611e2445d9e9455b637e586527de948beb98439121f523f

Contents?: true

Size: 865 Bytes

Versions: 40

Compression:

Stored size: 865 Bytes

Contents

require 'base64'
Knock.setup do |config|

  ## Expiration claim
  ## ----------------
  ##
  ## How long before a token is expired.
  ##
  ## Default:
  # config.token_lifetime = 1.day

  ## Audience claim
  ## --------------
  ##
  ## Configure the audience claim to indentify the recipients that the token
  ## is intended for.
  ##
  ## Default:
  # config.token_audience = nil

  ## If using Auth0, uncomment the line below
  config.token_audience = -> { Rails.application.secrets.auth0_client_id }

  ## Signature key
  ## -------------
  ##
  ## Configure the key used to sign tokens.
  ##
  ## Default:
  # config.token_secret_signature_key = -> { Rails.application.secrets.secret_key_base }

  ## If using Auth0, uncomment the line below
  config.token_secret_signature_key = -> { JWT.base64url_decode Rails.application.secrets.auth0_client_secret }
  
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
auth0-5.1.2 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-5.1.1 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-5.1.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-5.0.1 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-5.0.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.17.1 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.17.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.16.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.15.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.14.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.13.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.12.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.11.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.10.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.9.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.8.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.7.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.6.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.5.0 examples/ruby-on-rails-api/config/initializers/knock.rb
auth0-4.4.0 examples/ruby-on-rails-api/config/initializers/knock.rb