Skip to content

Commit

Permalink
change to basic_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Dec 5, 2024
1 parent 79c11e5 commit 2c9856e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions common/app/scripts/services/_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ angular.module('bmmLibApp')
};

factory.getAuthorizationHeader = function() {
if (oidcUser.basic_auth) {
return "Basic " + oidcUser.basic_auth;
}
return "Bearer " + oidcUser.access_token;
};

Expand Down Expand Up @@ -669,13 +672,12 @@ angular.module('bmmLibApp')
var deferred = $q.defer();

var searchObject = $location.search();
if (searchObject.access_token) {
if (searchObject.basic_auth) {
console.log("basic auth detected");

console.log("bypass login and use provided basic auth token");

oidcUser = {
access_token: searchObject.access_token,
basic_auth: searchObject.basic_auth,
profile: {
"https://members.bcc.no/app_metadata": {
person_id: 1
Expand Down

0 comments on commit 2c9856e

Please sign in to comment.