github.com/jfrog/frogbot@v1.1.1-0.20231221090046-821a26f50338/action/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js (about) 1 /** 2 * Prefix token for usage in the Authorization header 3 * 4 * @param token OAuth token or JSON Web Token 5 */ 6 export function withAuthorizationPrefix(token) { 7 if (token.split(/\./).length === 3) { 8 return `bearer ${token}`; 9 } 10 return `token ${token}`; 11 }