-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: activate identity provider on specific url path #1484
base: develop
Are you sure you want to change the base?
Conversation
🥇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some documentation to the authentication concept as well as to the punchout guide, and write a short migration note.
6f912a4
to
7af2cc8
Compare
return this.identityProviderFactory.getInstance()?.intercept(req, next) ?? next.handle(req); | ||
return this.identityProviderFactory.initialized$.pipe( | ||
whenTruthy(), | ||
first(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first or better take(1) ?
7af2cc8
to
2077971
Compare
There is still a problem:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entering the login page after logout of the punchout user leads to an error page (see conversation page)
docs/concepts/authentication.md
Outdated
@@ -94,7 +94,7 @@ With the ICM identity provider, for example, the user is then automatically logg | |||
|
|||
## Activate Identity Provider on specific paths | |||
|
|||
For specific use cases the PWA have to activate the identity provider for specific pwa url paths. | |||
In future the PWA will have more cases which needs to activate the identity provider for specific pwa url paths. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to activate the identity provider for specific pwa url paths, e.g.
docs/concepts/authentication.md
Outdated
@@ -115,7 +115,7 @@ The behavior can be configured primarily by adding `activeOnPath` property for t | |||
|
|||
This configuration would activate the specific identity provider, when the PWA initially routes to a specific url. | |||
|
|||
An another possibility is to use the `OVERRIDE_IDENTITY_PROVIDERS` environment variable within the nginx deployment. | |||
Another possibility or the identity provider activation could be the usage of the `OVERRIDE_IDENTITY_PROVIDERS` environment variable within the nginx deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean: Another possibility of the identity provider ... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes ;)
This is a known issue in Development and has nothing to do with the PR. The punchout idp is configured to be active, when the /punchout route is used during the PWA initialization. The identity provider expects, that the punchout route has certain login parameter. Within the PWA it is configured, that the /punchout route redirects to the /login route in order to use the triggerLogin() function. In the use case it is described, that the user enters the /login page after successful logout. During the runtime of the PWA the punchout identity provider is still active. That's why the idp expects, that the /login route contains necessary parameter to login the punchout user. |
…TOR to force active identity provider on certain path
…stance is initialized
…erReturnType object an observable or a Promise
a47b14d
to
2daa5af
Compare
2daa5af
to
9ed88f7
Compare
…ate, introduce public api to access initialized$ subject values from outside, move getTriggerReturnType function to functions.ts
9ed88f7
to
043a871
Compare
PR Type
[ ] Bugfix
[ x ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:
What Is the Current Behavior?
Currently the PWA can only be setup with one active identity provider. The PWA should be configured for specific identity providers in such a way, that these are active, when the PWA is rendered with a specific url path. The punchout identity provider should be used, when the 'punchout' feature is active and the PWA is initially loaded with /punchout.
Issue Number: Closes #
What Is the New Behavior?
The
activeOnPath
property is introduced for theIdentityProviderImplementor
interface. When the current url path matches the configured value, then the new identity provider is used. If no url path has a match with the available identity providers, then the old behavior is used.Furthermore all identity provider guards and interceptors are adapted to wait until a active identity provider is found.
Does this PR Introduce a Breaking Change?
[ ] Yes
[ x ] No
Other Information
AB#88708