Add "response_mode=form_post" to CLI client.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
58363bca2c
commit
c27eb17f23
@ -18,10 +18,16 @@ type Client struct {
|
||||
fosite.DefaultOpenIDConnectClient
|
||||
}
|
||||
|
||||
// It implements both the base and OIDC client interfaces of Fosite.
|
||||
func (c Client) GetResponseModes() []fosite.ResponseModeType {
|
||||
// For now, all Pinniped clients always support "" (unspecified), "query", and "form_post" response modes.
|
||||
return []fosite.ResponseModeType{fosite.ResponseModeDefault, fosite.ResponseModeQuery, fosite.ResponseModeFormPost}
|
||||
}
|
||||
|
||||
// It implements both the base, OIDC, and response_mode client interfaces of Fosite.
|
||||
var (
|
||||
_ fosite.Client = (*Client)(nil)
|
||||
_ fosite.OpenIDConnectClient = (*Client)(nil)
|
||||
_ fosite.ResponseModeClient = (*Client)(nil)
|
||||
)
|
||||
|
||||
// StaticClientManager is a fosite.ClientManager with statically-defined clients.
|
||||
|
@ -59,6 +59,7 @@ func TestPinnipedCLI(t *testing.T) {
|
||||
require.Equal(t, "", c.GetRequestObjectSigningAlgorithm())
|
||||
require.Equal(t, "none", c.GetTokenEndpointAuthMethod())
|
||||
require.Equal(t, "RS256", c.GetTokenEndpointAuthSigningAlgorithm())
|
||||
require.Equal(t, []fosite.ResponseModeType{"", "query", "form_post"}, c.GetResponseModes())
|
||||
|
||||
marshaled, err := json.Marshal(c)
|
||||
require.NoError(t, err)
|
||||
|
Loading…
Reference in New Issue
Block a user