2023-10-26 04:27:07 +08:00
|
|
|
function withAuthorizationPrefix(token) {
|
|
|
|
if (token.split(/\./).length === 3) {
|
|
|
|
return `bearer ${token}`;
|
|
|
|
}
|
|
|
|
return `token ${token}`;
|
2022-11-04 00:55:07 +08:00
|
|
|
}
|
2023-10-26 04:27:07 +08:00
|
|
|
export {
|
|
|
|
withAuthorizationPrefix
|
|
|
|
};
|