Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

add auth-email header #394

Merged
merged 1 commit into from
May 28, 2021
Merged
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
6 changes: 6 additions & 0 deletions src/models/request/tokenRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,10 @@ export class TokenRequest {

return obj;
}

alterIdentityTokenHeaders(headers: Headers) {
if (this.clientSecret == null && this.masterPasswordHash != null && this.email != null) {
headers.set('Auth-Email', this.email);
}
}
}
1 change: 1 addition & 0 deletions src/services/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export class ApiService implements ApiServiceAbstraction {
if (this.customUserAgent != null) {
headers.set('User-Agent', this.customUserAgent);
}
request.alterIdentityTokenHeaders(headers);
const response = await this.fetch(new Request(this.identityBaseUrl + '/connect/token', {
body: this.qsStringify(request.toIdentityToken(request.clientId ?? this.platformUtilsService.identityClientId)),
credentials: this.getCredentials(),
Expand Down