diff options
| author | mokha <mokha@cisco.com> | 2018-11-10 09:43:01 -0700 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-11-10 09:43:01 -0700 |
| commit | 864a74e3a3a0fc3317d1662306bdfce1ec58b298 (patch) | |
| tree | 23c6c2924d2827c47c59540afce7500e49191677 /lib | |
| parent | e544e7f72a42ed72243f4651cac8f0e78a960e36 (diff) | |
add helper to generate bearer token
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/net/hippie.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/net/hippie.rb b/lib/net/hippie.rb index b872654..71e786d 100644 --- a/lib/net/hippie.rb +++ b/lib/net/hippie.rb @@ -25,5 +25,9 @@ module Net def self.basic_auth(username, password) "Basic #{::Base64.strict_encode64("#{username}:#{password}")}" end + + def self.bearer_auth(token) + "Bearer #{token}" + end end end |
