Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Identity JSON response header (#6326)
- Loading branch information
1 parent
2d245ce
commit 2ab0b85
Showing
4 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
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,5 +1,17 @@ | ||
class MicrosoftController < ApplicationController | ||
after_action :set_version_header | ||
|
||
def identity_association | ||
render layout: false | ||
microsoft_indentity | ||
end | ||
|
||
private | ||
|
||
def set_version_header | ||
response.headers['Content-Length'] = { associatedApplications: [{ applicationId: @identity_json }] }.to_json.length | ||
end | ||
|
||
def microsoft_indentity | ||
@identity_json = ENV.fetch('AZURE_APP_ID', nil) | ||
end | ||
end |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
json.associatedApplications do | ||
json.array! [@identity_json] do |identity_id| | ||
json.applicationId identity_id | ||
end | ||
end |
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