This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
forked from authts/oidc-client-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change classes to use named exports instead of default exports
using default exports on the classes causes problems when attempting to use oidc-client as ES modules, since modules with default exports are being re-exported as named exports in index.js
- Loading branch information
1 parent
2b38397
commit 712986f
Showing
73 changed files
with
1,104 additions
and
5,421 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. | ||
|
||
import Log from './Log'; | ||
import { Log } from './Log'; | ||
|
||
export default class ErrorResponse extends Error { | ||
export class ErrorResponse extends Error { | ||
constructor({error, error_description, error_uri, state}={} | ||
) { | ||
if (!error){ | ||
Log.error("No error passed to ErrorResponse"); | ||
throw new Error("error"); | ||
} | ||
|
||
super(error_description || error); | ||
this.name = "ErrorResponse"; | ||
|
||
this.name = "ErrorResponse"; | ||
|
||
this.error = error; | ||
this.error_description = error_description; | ||
this.error_uri = error_uri; | ||
|
||
this.state = state; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. | ||
|
||
import Log from './Log'; | ||
import { Log } from './Log'; | ||
|
||
export default class InMemoryWebStorage{ | ||
export class InMemoryWebStorage{ | ||
constructor(){ | ||
this._data = {}; | ||
} | ||
|
||
getItem(key) { | ||
Log.debug("InMemoryWebStorage.getItem", key); | ||
return this._data[key]; | ||
} | ||
|
||
setItem(key, value){ | ||
Log.debug("InMemoryWebStorage.setItem", key); | ||
this._data[key] = value; | ||
} | ||
} | ||
|
||
removeItem(key){ | ||
Log.debug("InMemoryWebStorage.removeItem", key); | ||
delete this._data[key]; | ||
} | ||
|
||
get length() { | ||
return Object.getOwnPropertyNames(this._data).length; | ||
} | ||
|
||
key(index) { | ||
return Object.getOwnPropertyNames(this._data)[index]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.