piral-oauth2
Version:
Plugin to integrate OAuth 2.0 authentication in Piral.
14 lines • 360 B
JavaScript
/**
* Creates new Pilet API extensions for the integration of OAuth 2.0.
*/
export function createOAuth2Api(client) {
return (context) => {
context.on('before-fetch', client.extendHeaders);
return {
getAccessToken() {
return client.token();
},
};
};
}
//# sourceMappingURL=create.js.map