-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#333 oauth2-spike improve error handling
- Loading branch information
Showing
14 changed files
with
114 additions
and
107 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 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
21 changes: 21 additions & 0 deletions
21
oauth2-spike/frontend/src/app/user/user-authenticated.component.ts
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,21 @@ | ||
import { inject } from '@angular/core'; | ||
import { Component } from '@angular/core'; | ||
import { UserErrorComponent } from './user-error.component'; | ||
import { UserService } from './user.service'; | ||
|
||
@Component({ | ||
selector: 'kpn-user-authenticated', | ||
standalone: true, | ||
template: ` | ||
<p>logging in...</p> | ||
<kpn-user-error /> | ||
`, | ||
imports: [UserErrorComponent], | ||
}) | ||
export class UserAuthenticatedComponent { | ||
private readonly userService = inject(UserService); | ||
|
||
constructor() { | ||
this.userService.authenticated(); | ||
} | ||
} |
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
6 changes: 3 additions & 3 deletions
6
...end/src/app/pages/link-login.component.ts → ...src/app/user/user-link-login.component.ts
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
6 changes: 3 additions & 3 deletions
6
...nd/src/app/pages/link-logout.component.ts → ...rc/app/user/user-link-logout.component.ts
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
32 changes: 32 additions & 0 deletions
32
oauth2-spike/frontend/src/app/user/user-login.component.ts
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,32 @@ | ||
import { inject } from '@angular/core'; | ||
import { Component } from '@angular/core'; | ||
import { UserService } from './user.service'; | ||
import { UserErrorComponent } from './user-error.component'; | ||
|
||
@Component({ | ||
selector: 'kpn-user-login', | ||
standalone: true, | ||
template: ` | ||
<h1>Login</h1> | ||
<p>Here goes some explanation about the login process.</p> | ||
<p>Click the login button to login via the OpenStreetMap website.</p> | ||
<p>Click the cancel link to return to the previous page.</p> | ||
<div class="menu top-spacer"> | ||
<button (click)="login()">login</button> | ||
<a (click)="cancel()">cancel</a> | ||
</div> | ||
<kpn-user-error /> | ||
`, | ||
imports: [UserErrorComponent], | ||
}) | ||
export class UserLoginComponent { | ||
private readonly userService = inject(UserService); | ||
|
||
login(): void { | ||
this.userService.login(); | ||
} | ||
|
||
cancel(): void { | ||
this.userService.navigateToReturnUrl(); | ||
} | ||
} |
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