Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [16.0.3] - 2023-03-13
### Changes

- Adding refresh tokens to refresh calls even if access token isn't present to make manual testing easier.

## [16.0.2] - 2023-03-07
- Exposed getGlobalClaimValidators function via utils.

Expand Down
2 changes: 1 addition & 1 deletion bundle/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/BooleanClaim.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/PrimitiveArrayClaim.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/PrimitiveClaim.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/classes/SessionClaimValidator.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/default.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules.html

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions lib/build/fetch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/version.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/version.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions lib/ts/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export async function onUnauthorisedResponse(
// in the first place.
return { result: "SESSION_EXPIRED", error };
}

logDebugMessage("onUnauthorisedResponse: sending API_ERROR");
return { result: "API_ERROR", error };
} finally {
Expand Down Expand Up @@ -722,9 +723,11 @@ async function setAuthorizationHeaderIfRequired(clonedHeaders: Headers, addRefre
const refreshToken = await getTokenForHeaderAuth("refresh");

// We don't always need the refresh token because that's only required by the refresh call
// Still, we only add the Authorization header if both are present, because we are planning to add an option to expose the
// access token to the frontend while using cookie based auth - so that users can get the access token to use
if (accessToken !== undefined && refreshToken !== undefined) {
// Still, we only add the access token to Authorization header if both are present, because we are planning to add an option to expose the
// access token to the frontend while using cookie based auth - so that users can get the access token without using header based auth
// We can add the refresh token even if only that one is present, to make manual testing easier - you can then
// force a refresh by just deleting the access token.
if ((addRefreshToken || accessToken !== undefined) && refreshToken !== undefined) {
// the Headers class normalizes header names so we don't have to worry about casing
if (clonedHeaders.has("Authorization")) {
logDebugMessage("setAuthorizationHeaderIfRequired: Authorization header defined by the user, not adding");
Expand Down
2 changes: 1 addition & 1 deletion lib/ts/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
export const package_version = "16.0.2";
export const package_version = "16.0.3";

export const supported_fdi = ["1.16"];
Loading