spring-attic / spring-security-oauth

Support for adding OAuth1(a) and OAuth2 features (consumer and provider) for Spring web applications.
http://github.com/spring-projects/spring-security-oauth
Apache License 2.0
4.69k stars 4.04k forks source link

Username parameter - Configurable #1653

Open gaspo53 opened 5 years ago

gaspo53 commented 5 years ago

https://github.com/spring-projects/spring-security-oauth/blob/bbae0027eceb2c74a21ac26bbc86142dc732ffbe/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/password/ResourceOwnerPasswordTokenGranter.java#L63

Hi. Can't this be configured? For example, I need to use email instead of username. Or is there any way to do this now?

Thanks

DeCaMil commented 5 years ago

@gaspo53 , "username" is just the name of the parameter. There's nothing that defines what that parameter needs to looks like. Your frontend could certainly require an email address and then pass it as username"