feat: 초기 프로젝트 설정 및 룰.md 파일 추가
This commit is contained in:
12
api.hyungi.net/node_modules/@simplewebauthn/server/esm/metadata/parseJWT.js
generated
vendored
Normal file
12
api.hyungi.net/node_modules/@simplewebauthn/server/esm/metadata/parseJWT.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { isoBase64URL } from '../helpers/iso/index.js';
|
||||
/**
|
||||
* Process a JWT into Javascript-friendly data structures
|
||||
*/
|
||||
export function parseJWT(jwt) {
|
||||
const parts = jwt.split('.');
|
||||
return [
|
||||
JSON.parse(isoBase64URL.toUTF8String(parts[0])),
|
||||
JSON.parse(isoBase64URL.toUTF8String(parts[1])),
|
||||
parts[2],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user