Sha256: 16d3001f1add2057159a7c4dce5cd0415d0e471cb98028e99da33ae4ac688733
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
SimpleTokenAuthentication.configure do |config| # Configure the name of the HTTP headers watched for authentication. # # Default header names for a given token authenticatable entity follow the pattern: # { entity: { authentication_token: 'X-Entity-Token', email: 'X-Entity-Email'} } # # When several token authenticatable models are defined, custom header names # can be specified for none, any, or all of them. # # Examples # # Given User and SuperAdmin are token authenticatable, # When the following configuration is used: # `config.header_names = { super_admin: { authentication_token: 'X-Admin-Auth-Token' } }` # Then the token authentification handler for User watches the following headers: # `X-User-Token, X-User-Email` # And the token authentification handler for SuperAdmin watches the following headers: # `X-Admin-Auth-Token, X-SuperAdmin-Email` # config.header_names = { user: { authentication_token: 'X-User-Auth-Token', email: 'X-User-Email' } } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_token_authentication-1.2.0 | spec/dummy/config/initializers/simple_token_authentication.rb |