You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to know does this project support the ability to use "password" grant type?
By default is "client_credentials" is used oauth2.authorization-grant-type=client_credentials.
If yes, then where (how) can I to set username and password for token request?
Password grant type is not something you'd use for a backend integration. That's what you would use when you have an actual user trying to login with username and password. So you also wouldn't have that username and password as properties, but instead would have some kind of UI where the user would enter those.
Another question. If I create a custom (my) WebClient , then your GraphQLWebClient will use my WebClient or yours WebClient created by this starter,
Sorry if the question is asked awkwardly
You're first paragraph is correct, that is how it works. But that's the client credentials grant you're describing here. But instead of username and password it's using the client id and secret in a similar way. Make sure to read up on the various available grants and usages instead of asking that kind of details here. The https://auth0.com site has nice documentation about the various flows.
Regarding your other question. As you can see in the autoconfiguration class it'll create a WebClient instance in case it's missing. So if you're already providing a WebClient bean, then it'll use that one. That's normal Spring Boot convention. See:
Activity
oliemansm commentedon Apr 14, 2021
Password grant type is not something you'd use for a backend integration. That's what you would use when you have an actual user trying to login with username and password. So you also wouldn't have that username and password as properties, but instead would have some kind of UI where the user would enter those.
vadrem commentedon Apr 14, 2021
i assumed my one BE service 1 is a client for another BE service 2 (resource server on graphql-java-kickstart/graphql-spring-boot). Accordingly, service 1 keeps in itself username and password, and could receive token without UI.
For example: https://docs.spring.io/spring-security/site/docs/current/reference/html5/#using-the-access-token-2
ok
Another question. If I create a custom (my) WebClient , then your GraphQLWebClient will use my WebClient or yours WebClient created by this starter,
Sorry if the question is asked awkwardly
oliemansm commentedon Apr 14, 2021
You're first paragraph is correct, that is how it works. But that's the client credentials grant you're describing here. But instead of username and password it's using the client id and secret in a similar way. Make sure to read up on the various available grants and usages instead of asking that kind of details here. The https://auth0.com site has nice documentation about the various flows.
Regarding your other question. As you can see in the autoconfiguration class it'll create a WebClient instance in case it's missing. So if you're already providing a WebClient bean, then it'll use that one. That's normal Spring Boot convention. See:
graphql-spring-webclient/graphql-webclient-spring-boot-autoconfigure/src/main/java/graphql/kickstart/spring/webclient/boot/GraphQLWebClientAutoConfiguration.java
Line 36 in 17ffcc8
vadrem commentedon Apr 14, 2021
Thanks for your answers