Add OAuth2AuthorizeRequest.Builder.principal(String) as a convenience method for OAuth2AuthorizeRequest.Builder.principal(Authentication).
Comment From: sdoxsee
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!
Comment From: jgrandja
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.
Comment From: sdoxsee
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!
Comment From: jgrandja
Hang-in there @sdoxsee. Hopefully some normalcy will come sooner than later. Talk soon!