Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak integration #1381

Merged
merged 59 commits into from
Aug 26, 2022
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
83259f6
added proxy for local keycloak
TheSlimvReal May 23, 2022
a713dca
remote session authorizes against keycloak
TheSlimvReal May 23, 2022
a79151a
Merge remote-tracking branch 'origin/master' into keycloak
TheSlimvReal Jul 17, 2022
fc74555
updated to latest version and added support for autologin. Currently …
TheSlimvReal Jul 17, 2022
7563404
added tests for remote session login using jwt
TheSlimvReal Jul 18, 2022
4b9fd51
addded token renewal
TheSlimvReal Jul 18, 2022
82a1445
cleaned up remote session
TheSlimvReal Jul 18, 2022
6a2f3a0
added automatic refresh of token when opening app
TheSlimvReal Jul 18, 2022
85d32c1
Merge branch 'master' into keycloak
TheSlimvReal Jul 19, 2022
a8e3c9d
added keycloak package
TheSlimvReal Jul 27, 2022
7d8299d
added proxy for keycloak
TheSlimvReal Jul 29, 2022
2485c72
Merge remote-tracking branch 'origin/master' into keycloak
TheSlimvReal Jul 29, 2022
4d3fd86
excluding /auth requests from service worker
TheSlimvReal Jul 29, 2022
d448d47
fixed tests
TheSlimvReal Jul 29, 2022
e713b24
Merge branch 'master' into keycloak
TheSlimvReal Jul 29, 2022
f3faa2d
cleaned up reset password flow
TheSlimvReal Jul 30, 2022
8fe5bf1
Merge remote-tracking branch 'origin/keycloak' into keycloak
TheSlimvReal Jul 30, 2022
99e040a
trying to get reverse proxy for keycloak working
TheSlimvReal Aug 1, 2022
a095611
using keycloak without a proxy
TheSlimvReal Aug 1, 2022
1c1fc7d
fixed tests
TheSlimvReal Aug 1, 2022
d048beb
Merge remote-tracking branch 'origin/master' into keycloak
TheSlimvReal Aug 8, 2022
0ad5868
fixed url for keycloak auth
TheSlimvReal Aug 8, 2022
af49273
some general code cleanup
TheSlimvReal Aug 10, 2022
25e16cd
some more general code cleanup
TheSlimvReal Aug 10, 2022
dc576b8
fixed test
TheSlimvReal Aug 10, 2022
2929778
app doesnt fail if keycloak couldnt be initialized
TheSlimvReal Aug 10, 2022
6d9b894
Merge remote-tracking branch 'origin/master' into keycloak
TheSlimvReal Aug 10, 2022
42c45f3
not initializing keycloak with app initializer
TheSlimvReal Aug 10, 2022
a9f0dab
cleaned up ngsw config
TheSlimvReal Aug 11, 2022
74903dd
refactored keycloak login logic to own service
TheSlimvReal Aug 11, 2022
cdcd433
re-implemented couchdb auth as alternative to keycloak
TheSlimvReal Aug 11, 2022
9d9e76c
re-added tests for CouchDB auth
TheSlimvReal Aug 11, 2022
1858bf3
added documenation and cleaned up code
TheSlimvReal Aug 11, 2022
d3f4dca
fix keycloak test
TheSlimvReal Aug 11, 2022
13ebe11
Merge branch 'master' into keycloak
TheSlimvReal Aug 12, 2022
23081a7
Merge branch 'master' into keycloak
TheSlimvReal Aug 15, 2022
169cab1
Fix typo
TheSlimvReal Aug 17, 2022
221d69e
properly named class for access tokens
TheSlimvReal Aug 17, 2022
4d809b5
Merge remote-tracking branch 'origin/keycloak' into keycloak
TheSlimvReal Aug 17, 2022
5662545
Merge remote-tracking branch 'origin/master' into keycloak
TheSlimvReal Aug 17, 2022
693c44f
integrated password-form component when using CouchDBAuth
TheSlimvReal Aug 18, 2022
0e18596
cleaned up some code
TheSlimvReal Aug 18, 2022
1426107
Merge branch 'master' into keycloak
TheSlimvReal Aug 23, 2022
5ce39fd
removed reserved route
TheSlimvReal Aug 23, 2022
71196c4
Merge remote-tracking branch 'origin/keycloak' into keycloak
TheSlimvReal Aug 23, 2022
812f4f5
undone changes to ngsw config
TheSlimvReal Aug 23, 2022
f4e6c5a
trying to make authenticator configurable, DI not working
TheSlimvReal Aug 23, 2022
c61c662
fixed AuthService DI
TheSlimvReal Aug 23, 2022
55a50f1
removed unused code
TheSlimvReal Aug 25, 2022
14b05e3
made CouchDB auth default and added enum with additional documentation.
TheSlimvReal Aug 25, 2022
ee6b12c
moved password reset button to own component
TheSlimvReal Aug 25, 2022
ef67e1b
fixed password form component
TheSlimvReal Aug 26, 2022
ce60bda
Merge branch 'master' into keycloak
TheSlimvReal Aug 26, 2022
d486adc
cleaned up code
TheSlimvReal Aug 26, 2022
86d92f0
fixed broken tests
TheSlimvReal Aug 26, 2022
26cf2c9
Merge remote-tracking branch 'origin/keycloak' into keycloak
TheSlimvReal Aug 26, 2022
39562a9
Merge branch 'master' into keycloak
TheSlimvReal Aug 26, 2022
b555879
Merge branch 'master' into keycloak
TheSlimvReal Aug 26, 2022
6df220f
removed promise rejection
TheSlimvReal Aug 26, 2022
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
Prev Previous commit
Next Next commit
fixed password form component
  • Loading branch information
TheSlimvReal committed Aug 26, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ef67e1bacbf9c1275f36deb22a0a4546a60d09ed
5 changes: 0 additions & 5 deletions src/app/core/session/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -34,9 +34,4 @@ export abstract class AuthService {
* Clear the local session of the currently logged-in user.
*/
abstract logout(): Promise<void>;

/**
* Change the password of a user.
*/
abstract changePassword(): Promise<any>;
}
Original file line number Diff line number Diff line change
@@ -26,6 +26,12 @@
<input matInput type="password" formControlName="newPassword"/>
</label>
<mat-error *ngIf="passwordForm.get('newPassword').invalid">
<div
*ngIf="passwordForm.get('newPassword').errors.required"
i18n="Password validation"
>
Please enter a new password.
</div>
<div
*ngIf="passwordForm.get('newPassword').errors.minlength"
i18n="Password validation"
@@ -59,7 +65,7 @@
"
i18n="Illegal new password"
>
Confirmation does not match your new password.
Passwords don't match.
</mat-error>
</mat-form-field>
<br/>
@@ -78,7 +84,7 @@
<button
mat-raised-button
type="submit"
[disabled]="passwordForm.invalid || passwordForm.disabled"
[disabled]="passwordForm.disabled"
(click)="changePassword()"
(submit)="changePassword()"
i18n="Change password button"
Original file line number Diff line number Diff line change
@@ -52,19 +52,15 @@ export class PasswordFormComponent implements OnInit {
}

ngOnInit() {
console.log("disabled", this.disabled);
console.log("form", this.passwordForm.valid, this.passwordForm.disabled);
if (this.disabled) {
this.passwordForm.disable();
}
console.log(
"form after",
this.passwordForm.valid,
this.passwordForm.disabled
);
}

changePassword(): Promise<any> {
if (this.passwordForm.invalid) {
return;
}
this.passwordChangeResult = undefined;

const currentPassword = this.passwordForm.get("currentPassword").value;
5 changes: 3 additions & 2 deletions src/app/core/user/user-account/user-account.component.html
Original file line number Diff line number Diff line change
@@ -42,8 +42,9 @@
[disabled]="passwordChangeDisabled"
></app-password-form>

<app-password-button [disabled]="passwordChangeDisabled">
</app-password-button>
<app-password-button
[disabled]="passwordChangeDisabled"
></app-password-button>
</div>
</div>
</ng-template>