Feature/more external auth options #138
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



We ran into a need where an external auth provider expects credential in the request headers instead of body and the auth token is returned in the body instead of a cookie. This PR adds three external auth options:
data_as_headerstoken_cookie_mappingssecret_prompt_mappingsThese are made to be optional and the
authenticate_with_externalwould retain existing behaviors when these options are not defined.There is one functional change to
start_session_from_configurationto change how auth tokens are retrieved when external auth is enabled. It has been changed from a direct authentication against Aerie gateway, which would not work if the app is fully delegating authentication to an external provider, to a new validateSSO function that validates externally authenticated sessions against Aerie gateway.