kvds-magister-openid
v0.1.7
Published
OpenID authentication wrapper for the Magister digital school system
Downloads
1
Readme
Magister OpenID
OpenID authentication wrapper for the Magister digital school system
Note this package is no longer actively maintained, use at your own risk.
This package provides a simple and spec compliant API for requesting, refreshing and managing authentication tokens
Simple authentication flow:
import { AuthManager } from "magister-openid";
import { username, password, tenant } from "./options.json";
const manager = new AuthManager(tenant);
async function login() {
const tokenSet = await manager.login(username, password, authCode);
//do stuff with tokens
}
login();
Refreshing tokens and checking for expiration of tokens are both implemented in the tests. They provide further documentation.
This library would not be possible without the incredible Node OpenID library, created by @panva, thank you very much for the amazing work!