You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 505B

12345678910111213141516
  1. /* @flow */
  2. import { parseURLParams } from '../config';
  3. /**
  4. * Retrieves the JSON Web Token (JWT), if any, defined by a specific
  5. * {@link URL}.
  6. *
  7. * @param {URL} url - The {@code URL} to parse and retrieve the JSON Web Token
  8. * (JWT), if any, from.
  9. * @returns {string} The JSON Web Token (JWT), if any, defined by the specified
  10. * {@code url}; otherwise, {@code undefined}.
  11. */
  12. export function parseJWTFromURLParams(url: URL = window.location) {
  13. return parseURLParams(url, true, 'search').jwt;
  14. }