Add "username" and "password" as optional Oauth 2.0 authentication
Describe the feature request
Hi! It would be really useful to be able to add in the client side yaml config file an option to add username and password. This because some web services rely on that data to create a special token. It could be something like: endpoints: - name: "/webservice/endpoint" url: "https://some-url/" client: oauth2: token-url: https://auth.com/protocol/openid-connect/token client-id: something-client client-secret: something-password scopes: ["scope"] interval: 5m group: Web Service conditions: - "[STATUS] == 200"
Why do you personally want this feature to be implemented?
There are a lot of companies that want to check their services, and implement extra token information that needs to be created with a username and password. Like Keycloak for instance.
How long have you been using this project?
2 months
Additional information
No response
Hello, I also agree.
It is very valuable and important.
When I trying to configure Nifi API monitoring with Gatus using Oauth2 client, I get an error from the Nifi server.
2022-09-11 16:26:56,360 DEBUG [NiFi Web Server-17] o.a.n.w.s.l.RequestAuthenticationFilter Username not found Remote Address [127.0.0.1]
This problem could be solved by passing Username for the Nifi server.
Could you expand on what kind of configuration you'd like to see? The example you provided has no username/passwore fields.
Hi! So I was thinking if it could be added as an optional option inside oauth2. Like this. - name: "/some/endpoint/{id}" url: "https://some-url.com/" client: oauth2: token-url: https://some-auth-url.com/openid-connect/token client-id: client-id client-secret: some-secret scopes: ["scope"] username: [email protected] password: some-password interval: 5m group: Web Service conditions: - "[STATUS] == 200"
So what you really want is OAuth2 password grant? Yeah, that sounds like a reasonable idea.