Sign in
apache
/
pulsar-test-infra
/
b772c2ee2c3d010c843884d6f17f4a5d45d52d7a
/
.
/
setup-maven
/
node_modules
/
@octokit
/
auth-token
/
dist-src
/
auth.js
blob: 2d5005c22fc14ee2b1053be013449dd516ea2f9e [
file
] [
log
] [
blame
]
export
async
function
auth
(
token
)
{
const
tokenType
=
token
.
split
(
/\./
).
length
===
3
?
"app"
:
/^v\d+\./
.
test
(
token
)
?
"installation"
:
"oauth"
;
return
{
type
:
"token"
,
token
:
token
,
tokenType
};
}