Method: SimpleTokenAuthentication::Entity#token_header_name

Defined in:
lib/simple_token_authentication/entity.rb

#token_header_nameObject

Private: Return the name of the header to watch for the token authentication param



22
23
24
25
26
27
28
29
# File 'lib/simple_token_authentication/entity.rb', line 22

def token_header_name
  if SimpleTokenAuthentication.header_names["#{name_underscore}".to_sym].presence \
    && token_header_name = SimpleTokenAuthentication.header_names["#{name_underscore}".to_sym][:authentication_token]
    token_header_name
  else
    "X-#{name_underscore.camelize}-Token"
  end
end