AuthInterface

AuthInterface

new AuthInterface(auth) → {AuthInterface}

Creates a wrapper around RequestAuth and provides getters and setters helper functions

Parameters:
Name Type Description
auth RequestAuth
Source:
Throws:
Error
Returns:
Type
AuthInterface

Methods

get(keys) → {*}

Parameters:
Name Type Description
keys String | Array.<String>
Source:
Returns:

Returns a value for a key or an object having all keys & values depending on the input

Type
*
Example
get('foo') // bar
get(['foo', 'alpha']) // {foo: 'bar', 'alpha': 'beta'}

set(key, valueopt) → {AuthInterface}

Parameters:
Name Type Attributes Description
key String | Object
value * <optional>
Source:
Throws:
Error
Returns:
Type
AuthInterface
Example
set('foo', 'bar')
set({foo: 'bar', 'alpha': 'beta'})