-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Authenticate with CIR using google ID token (#1288)
--------- Co-authored-by: Mebin Abraham <35296336+MebinAbraham@users.noreply.github.com> Co-authored-by: Mebin Abraham <mebin95+work@gmail.com>
- Loading branch information
1 parent
67ce919
commit bc3d5f6
Showing
8 changed files
with
83 additions
and
11 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
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
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
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
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,12 @@ | ||
import requests | ||
from flask import current_app | ||
|
||
from app.oidc.oidc import OIDCCredentialsService | ||
|
||
|
||
def fetch_and_apply_oidc_credentials(session: requests.Session, client_id: str) -> None: | ||
# Type ignore: oidc_credentials_service is a singleton of this application | ||
oidc_credentials_service: OIDCCredentialsService = current_app.eq["oidc_credentials_service"] # type: ignore | ||
|
||
credentials = oidc_credentials_service.get_credentials(iap_client_id=client_id) | ||
credentials.apply(headers=session.headers) |
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
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
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