Removed audience from RegisterOAuthClient for teseting

This commit is contained in:
David Allen 2024-02-27 08:12:28 -07:00
parent 681cfc4f59
commit 3b7819c7f6
No known key found for this signature in database
GPG key ID: 1D2A29322FBB6FCB

View file

@ -62,6 +62,9 @@ func (client *Client) InitiateLoginFlow(loginUrl string) error {
// get the flow ID from response // get the flow ID from response
body, err := io.ReadAll(res.Body) body, err := io.ReadAll(res.Body)
if err != nil {
return fmt.Errorf("failed to read response body: %v", err)
}
var flowData map[string]any var flowData map[string]any
err = json.Unmarshal(body, &flowData) err = json.Unmarshal(body, &flowData)
@ -218,8 +221,10 @@ func (client *Client) RegisterOAuthClient(registerUrl string, audience []string)
"scope": "openid email profile", "scope": "openid email profile",
"grant_types": ["client_credentials", "urn:ietf:params:oauth:grant-type:jwt-bearer"], "grant_types": ["client_credentials", "urn:ietf:params:oauth:grant-type:jwt-bearer"],
"response_types": ["token"], "response_types": ["token"],
"audience": [%s] }`, client.Id, client.Secret,
}`, client.Id, client.Secret, strings.Join(audience, ","))) // strings.Join(audience, ",")
))
// "audience": [%s]
req, err := http.NewRequest("POST", registerUrl, bytes.NewBuffer(data)) req, err := http.NewRequest("POST", registerUrl, bytes.NewBuffer(data))
if err != nil { if err != nil {