Skip to content

Brightspace/frau-xsrf-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

frau-xsrf-token

NPM version

Simple utility to get an XSRF token in a D2L free range application (frau).

It is recommended you do not use this library directly, and instead use a dependent, such as [frau-superagent-xsrf-token][superagent-plugin].

Install

npm install frau-xsrf-token --save

Usage

import xsrfToken from 'frau-xsrf-token';

const token = await xsrfToken();

API


xsrfToken() -> Promise<String>

Gets the active session's XSRF-Token from various sources for use when making calls. Returns a Promise to a String

Testing

npm test

Versioning and Releasing

This repo is configured to use semantic-release. Commits prefixed with fix: and feat: will trigger patch and minor releases when merged to main.

To learn how to create major releases and release from maintenance branches, refer to the semantic-release GitHub Action documentation.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors