Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

brightspace-auth-assertions

Example

import AssertionCompiler from 'brightspace-auth-assertions';
import AuthToken from 'brightspace-auth-token';

const asserter = new AssertionCompiler()
	.scope('valance', 'apps', 'manage').require()
	.context('user').require() // Valid contexts are 'user', 'tenant', and 'global'
	.impersonation().reject()
	.compile();

// ...

server.on('request', function (req) {
	const auth = getAuthInfo();

	const token = new AuthToken(auth);

	asserter(token);
});