Sha256: 9a9df47bc981d1f0b7709350722d7ae418b9db259bcb728c352a5ab7990037a6
Contents?: true
Size: 702 Bytes
Versions: 4
Compression:
Stored size: 702 Bytes
Contents
module Arcadex module Header #Gets the auth_token from either the url or header def self.grab_token(params,request) #Header token has preference if !params["auth_token"].blank? auth_token = params["auth_token"] end if !request.headers["Auth-Token"].blank? auth_token = request.headers["Auth-Token"] end return auth_token end #Gets the email from either the url or header def self.grab_email(params,request) #Header email has preference if !params["email"].blank? email = params["email"] end if !request.headers["Email"].blank? email = request.headers["Email"] end return email end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
arcadex-1.1.3 | lib/arcadex/header.rb |
arcadex-1.1.2 | lib/arcadex/header.rb |
arcadex-1.1.1 | lib/arcadex/header.rb |
arcadex-1.1.0 | lib/arcadex/header.rb |