Made changes to get client credentials grant working

This commit is contained in:
David J. Allen 2024-03-20 16:52:08 -06:00
parent e67bc3e010
commit 5173701fa0
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
7 changed files with 135 additions and 64 deletions

View file

@ -72,13 +72,13 @@ func NewClientWithConfigById(config *Config, id string) *oauth.Client {
return nil
}
func NewClientCredentialsFlowWithConfig(config *Config, client *oauth.Client) error {
func NewClientCredentialsFlowWithConfig(config *Config, params flows.ClientCredentialsFlowParams) (string, error) {
eps := flows.ClientCredentialsFlowEndpoints{
Create: config.Authorization.Endpoints.Clients,
Clients: config.Authorization.Endpoints.Clients,
Authorize: config.Authorization.Endpoints.Authorize,
Token: config.Authorization.Endpoints.Token,
}
return flows.NewClientCredentialsFlow(eps, client)
return flows.NewClientCredentialsFlow(eps, params)
}
func NewServerWithConfig(conf *Config) *server.Server {