Skip to content

Commit

Permalink
Adds new bearer authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
Florencia-97 committed Jun 9, 2024
1 parent 7c92603 commit d694c18
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/authorization/BearerAuthorizationManager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {AuthorizationManager} from "@eryxcoop/appyx-comm";

export default class BearerAuthorizationManager extends AuthorizationManager {

constructor(getSessionToken) {
super();
this._getSessionToken = getSessionToken;
}

configureHeaders(headers) {
const token = this._getSessionToken();
headers['Authorization'] = `Bearer ${token}`;
}
}

0 comments on commit d694c18

Please sign in to comment.