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

Add OAuth2AuthorizeRequest.Builder.principal(String) #8018

Closed
jgrandja opened this issue Feb 24, 2020 · 4 comments
Closed

Add OAuth2AuthorizeRequest.Builder.principal(String) #8018

jgrandja opened this issue Feb 24, 2020 · 4 comments
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Milestone

Comments

@jgrandja
Copy link
Contributor

Add OAuth2AuthorizeRequest.Builder.principal(String) as a convenience method for OAuth2AuthorizeRequest.Builder.principal(Authentication).

@jgrandja jgrandja added type: enhancement A general enhancement in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Feb 24, 2020
@jgrandja jgrandja added this to the 5.3.0 milestone Feb 24, 2020
@jgrandja jgrandja self-assigned this Feb 24, 2020
@sdoxsee
Copy link
Contributor

sdoxsee commented Mar 19, 2020

Hey @jgrandja! Hope you're keeping well in these crazy times!

This is possibly a separate issue but seeing as principal is currently required by OAuth2AuthorizeRequest.Builder and, for the case of Client Credentials (where you may not have a request context or an Authentication), would you recommend using this convenience method as a workaround to create a pseudo-Authentication from a String (like "client-registration-id") in lieu of obtaining one from the request context? Or would it make sense to use the clientRegistrationId in the builder as the principal string if no principal is set? Thanks!

@jgrandja
Copy link
Contributor Author

Hey @sdoxsee! Thanks for asking and yes we are all doing well. I hope you and the family are well too?

In the case of a client_credentials client, I would tyically use the client-id as the Principal name. However, registration-id is an option as well. But I think client-id makes more sense since it uniquely identifies the client at the provider and can be considered a Principal.

@sdoxsee
Copy link
Contributor

sdoxsee commented Mar 19, 2020

Thanks @jgrandja. Glad you guys are well! It's a zoo here but we're having fun in self-isolation :) Trying to figure out how to handle the combination of social distancing, work, closed schools, and unknown timelines :)

Thanks for the suggestion!

@jgrandja
Copy link
Contributor Author

Hang-in there @sdoxsee. Hopefully some normalcy will come sooner than later. Talk soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants