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