lib/githubAuthentication.js
function createGithubCredentials(token) {
  return new Promise((resolve, reject) => {
    if (token) {
      resolve({ type: 'oauth', token: token });
    }
    else {
      reject('Missing token');
    }
  });
}
function createGithubCredentials(token) {
  return new Promise((resolve, reject) => {
    if (token) {
      resolve({ type: 'oauth', token: token });
    }
    else {
      reject('Missing token');
    }
  });
}
function createGithubCredentials ( token ) { return new Promise ( ( resolve , reject ) => { if ( token ) { resolve ( { type : 'oauth' , token : token } ) ; } else { reject ( 'Missing token' ) ; } } ) ; }
Takes a token and returns an object used for authenticating with the Github API.
@param  {String} token 40-char token string
@return {Promise}      Resolves to an Object containing the token
Takes a token and returns an object used for authenticating with the Github API .