gifted-gold-29282
12/27/2022, 4:51 PMbright-policeman-41717
12/31/2022, 3:18 PMgifted-gold-29282
12/31/2022, 4:20 PMbright-policeman-41717
12/31/2022, 4:22 PMbright-policeman-41717
12/31/2022, 4:24 PMbright-policeman-41717
12/31/2022, 4:24 PM<https://www.ory.sh/docs/reference/api>
bright-policeman-41717
12/31/2022, 4:24 PMbright-policeman-41717
12/31/2022, 4:25 PMgifted-gold-29282
12/31/2022, 4:30 PMbright-policeman-41717
12/31/2022, 4:31 PMbright-policeman-41717
12/31/2022, 4:35 PM_, _, err = s.HydraAPIClient.AdminApi.CreateOAuth2Client(ctx).
OAuth2Client(hydra.OAuth2Client{
ClientId: pointer.ToString(s.IDPConfig.ClientID),
ClientName: pointer.ToString("Test OAuth2 Client"),
ClientSecret: pointer.ToString(s.IDPConfig.ClientSecret),
GrantTypes: []string{"authorization_code", "refresh_token"},
RedirectUris: []string{fmt.Sprintf("<http://localhost:3001/login/generic_oauth>")},
ResponseTypes: []string{"code", "id_token"},
Scope: pointer.ToString("openid offline"),
TokenEndpointAuthMethod: pointer.ToString("client_secret_post"),
Metadata: s.IDPConfig.ClientMetadata,
}).Execute()
if err != nil {
log.Fatalln("unable to create OAuth2 client: ", err)
}
<http://log.Info|log.Info>("Successfully created OAuth2 client!")
}
bright-policeman-41717
12/31/2022, 4:36 PM