This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(bridge): Login via OpenID (#6076) Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * use different env for client redirect uri Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * build redirect URL with base and prefix Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * make user identifier configurable Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * logout with POST instead of GET, increased state timeout to 60 minutes Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * Added login via OpenID to README Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * added tests Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * added tests for OAuth flow, removed app in global, fixed non-terminating tests Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * adapted readme and fallback of user identifier Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * added new OAUTH env variables to installer Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * added OAUTH_SCOPE env variable for additional scopes Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * add new scope env to installer Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * fixed test Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * fixed code style Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * redirect to logout page after logout. revoke token on logout Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * fixed test Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * implemented requested changes Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * implemented requested changes, fixed unit tests Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * fixed redirect on logout, renamed loggedOur URL Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com> * fixed unit test Signed-off-by: Klaus Strießnig <k.striessnig@gmail.com>
- Loading branch information
Showing
33 changed files
with
842 additions
and
317 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 |
---|---|---|
|
@@ -51,3 +51,8 @@ Thumbs.db | |
# e2e screenshots | ||
e2e/screenshots/* | ||
!e2e/screenshots/.gitkeep | ||
|
||
# certificates | ||
*.pem | ||
*.crt | ||
*.key |
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
7 changes: 6 additions & 1 deletion
7
bridge/client/app/_components/ktb-user/ktb-user.component.html
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,6 +1,11 @@ | ||
<div class="user"> | ||
<p>User: {{ user }}</p> | ||
<div> | ||
<button (click)="logout()" dt-button>Logout</button> | ||
<form (ngSubmit)="logout($event)" method="POST" [action]="logoutFormData.end_session_endpoint"> | ||
<input type="hidden" name="state" [value]="logoutFormData.state" /> | ||
<input type="hidden" name="post_logout_redirect_uri" [value]="logoutFormData.post_logout_redirect_uri" /> | ||
<input type="hidden" name="id_token_hint" [value]="logoutFormData.id_token_hint" /> | ||
<button type="submit" dt-button>Logout</button> | ||
</form> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { Express } from 'express'; | ||
import { AxiosInstance } from 'axios'; | ||
|
||
declare global { | ||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
namespace NodeJS { | ||
interface Global { | ||
app: Express; | ||
baseUrl: string; | ||
axiosInstance: AxiosInstance; | ||
issuer?: unknown; | ||
} | ||
} | ||
} |
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 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
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ declare global { | |
namespace NodeJS { | ||
interface Global { | ||
axiosInstance?: AxiosInstance; | ||
issuer?: unknown; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.