mirror of
https://github.com/ASzc/change-string-case-action.git
synced 2024-11-24 08:33:51 +08:00
13 lines
274 B
JavaScript
13 lines
274 B
JavaScript
export async function auth(token) {
|
|
const tokenType = token.split(/\./).length === 3
|
|
? "app"
|
|
: /^v\d+\./.test(token)
|
|
? "installation"
|
|
: "oauth";
|
|
return {
|
|
type: "token",
|
|
token: token,
|
|
tokenType
|
|
};
|
|
}
|