Module

utils/auth

Authorization helpers

View Source utils/auth.js, line 1

Methods

# inner generateBasicAuthToken(clientId, clientSecret) → {object}

Generate Basic-type header authorization token for RewardOps API

Parameters:
Name Type Description
clientId string

RewardOps API client ID

clientSecret string

RewardOps API client secret

View Source utils/auth.js, line 19

Object with Basic-type Authorization header property

object
Example
generateBasicAuthToken('abc123', 'xyz987')
// => { Authorization: 'Basic YWJjMTIzOnh5ejk4Nw==' }