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

Display userinfo #484

Merged
merged 19 commits into from
Apr 17, 2019

Conversation

JohannesDoberer
Copy link
Contributor

No description provided.

@maxmarkus maxmarkus self-assigned this Apr 15, 2019
Copy link
Contributor

@maxmarkus maxmarkus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments.

@maxmarkus maxmarkus changed the title display userinfo Display userinfo Apr 15, 2019
Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments

@@ -39,6 +40,7 @@ auth: {
- **automaticSilentRenew** enables the automatic silent renewal of the token if it is supported by the server. The default value is `false`. For this mechanism to work, the browser must have third-party cookies support enabled.
- **accessTokenExpiringNotificationTime** is the number of seconds before an access token is to expire and triggers silent token refresh. The default value is 60.
- **thirdPartyCookiesScriptLocation** is the URL to the page containing third-party cookies support check. For details, see [Third-party cookies and silent token refresh section](#Third-party-cookies-and-silent-token-refresh).
- **userInfoFn** provides a function to get user information. It returns a promise of an user info object which contains user name and/or email to display it in the profile dropdown.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **userInfoFn** provides a function to get user information. It returns a promise of an user info object which contains user name and/or email to display it in the profile dropdown.
- **userInfoFn** provides a function to get user information. It returns a promise of a user info object which contains user name and/or email to display in the profile dropdown.

@@ -74,6 +77,39 @@ auth: {
- **response_type** defaults to the **id_token**. Any other parameter that is added to oAuthData is also added to the authorization payload.
- **nonceFn** provides a function that returns a string in order to override the default **nonce**.
- **logoutFn** provides the function to override the **logoutUrl** functionality for a custom logout. It needs to execute the **logoutCallback()** function after logout.
- **userInfoFn** provides a function to get user information. It returns a promise of an user info object which contains user name and/or email to display it in the profile dropdown.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **userInfoFn** provides a function to get user information. It returns a promise of an user info object which contains user name and/or email to display it in the profile dropdown.
- **userInfoFn** provides a function to get user information. It returns a promise of a user info object which contains user name and/or email to display in the profile dropdown.


userInfo(){
// logic to get some user information
// returns a promise of an userinfo object which contains user name and/or email to display it in the profile dropdown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// returns a promise of an userinfo object which contains user name and/or email to display it in the profile dropdown
// returns a promise of a userinfo object which contains user name and/or email to display in the profile dropdown menu

- **userInfoFn** provides a function to get user information. It returns a promise of an user info object which contains user name and/or email to display it in the profile dropdown.


### Custom Authentification Provider
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering, should it be authentification or authentication? I was researching similar providers and it was authentication 🤔 but I might be wrong :) However, it is used to authenticate the user right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are totally right :)


### Custom Authentification Provider

If you are using any authentification provider you also have the possibility to implement some functions that luigi can deal with.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are using any authentification provider you also have the possibility to implement some functions that luigi can deal with.
If you are using any authentication provider you can also implement some other functions for Luigi to use.


login(){
// logic to handle the login mechanism
// returns a promise which contains a error message if something went wrong
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// returns a promise which contains a error message if something went wrong
// returns a promise which contains an error message if something went wrong


userInfo(){
// logic to get some user information
// returns a promise of a userinfo object which contains user name and/or email to display in the profile dropdown menu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// returns a promise of a userinfo object which contains user name and/or email to display in the profile dropdown menu
// returns a promise of a userinfo object which contains a user name and/or email to display in the profile dropdown menu

@@ -39,6 +40,7 @@ auth: {
- **automaticSilentRenew** enables the automatic silent renewal of the token if it is supported by the server. The default value is `false`. For this mechanism to work, the browser must have third-party cookies support enabled.
- **accessTokenExpiringNotificationTime** is the number of seconds before an access token is to expire and triggers silent token refresh. The default value is 60.
- **thirdPartyCookiesScriptLocation** is the URL to the page containing third-party cookies support check. For details, see [Third-party cookies and silent token refresh section](#Third-party-cookies-and-silent-token-refresh).
- **userInfoFn** provides a function to get user information. It returns a promise of a user info object which contains user name and/or email to display in the profile dropdown.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **userInfoFn** provides a function to get user information. It returns a promise of a user info object which contains user name and/or email to display in the profile dropdown.
- **userInfoFn** provides a function to get user information. It returns a promise of a **userinfo** object which contains user name and/or email to display in the profile dropdown menu.

@@ -74,6 +77,39 @@ auth: {
- **response_type** defaults to the **id_token**. Any other parameter that is added to oAuthData is also added to the authorization payload.
- **nonceFn** provides a function that returns a string in order to override the default **nonce**.
- **logoutFn** provides the function to override the **logoutUrl** functionality for a custom logout. It needs to execute the **logoutCallback()** function after logout.
- **userInfoFn** provides a function to get user information. It returns a promise of a user info object which contains user name and/or email to display in the profile dropdown.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **userInfoFn** provides a function to get user information. It returns a promise of a user info object which contains user name and/or email to display in the profile dropdown.
- **userInfoFn** provides a function to get user information. It returns a promise of a **userinfo** object which contains user name and/or email to display in the profile dropdown menu.

@JohannesDoberer JohannesDoberer merged commit 1eb1b51 into SAP:master Apr 17, 2019
@JohannesDoberer JohannesDoberer deleted the display-user-name-or-email branch April 17, 2019 14:46
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants