Skip to content

Commit

Permalink
Add PKCE flag to Identity Provider configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Gomes committed Jun 1, 2022
1 parent b005e27 commit 5c609a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions access_identity_provider.go
Expand Up @@ -43,6 +43,7 @@ type AccessIdentityProviderConfiguration struct {
SsoTargetURL string `json:"sso_target_url,omitempty"`
SupportGroups bool `json:"support_groups,omitempty"`
TokenURL string `json:"token_url,omitempty"`
PKCEEnabled bool `json:"pkce_enabled,omitempty"`
}

// AccessIdentityProvidersListResponse is the API response for multiple
Expand Down
10 changes: 8 additions & 2 deletions access_identity_provider_test.go
Expand Up @@ -27,7 +27,8 @@ func TestAccessIdentityProviders(t *testing.T) {
"type": "github",
"config": {
"client_id": "example_id",
"client_secret": "a-secret-key"
"client_secret": "a-secret-key",
"pkce_enabled": true
}
}
]
Expand All @@ -43,6 +44,7 @@ func TestAccessIdentityProviders(t *testing.T) {
Config: AccessIdentityProviderConfiguration{
ClientID: "example_id",
ClientSecret: "a-secret-key",
PKCEEnabled: true,
},
},
}
Expand Down Expand Up @@ -132,7 +134,8 @@ func TestCreateAccessIdentityProvider(t *testing.T) {
"type": "github",
"config": {
"client_id": "example_id",
"client_secret": "a-secret-key"
"client_secret": "a-secret-key",
"pkce_enabled": true
}
}
}
Expand All @@ -145,6 +148,7 @@ func TestCreateAccessIdentityProvider(t *testing.T) {
Config: AccessIdentityProviderConfiguration{
ClientID: "example_id",
ClientSecret: "a-secret-key",
PKCEEnabled: true,
},
}

Expand All @@ -155,6 +159,7 @@ func TestCreateAccessIdentityProvider(t *testing.T) {
Config: AccessIdentityProviderConfiguration{
ClientID: "example_id",
ClientSecret: "a-secret-key",
PKCEEnabled: true,
},
}

Expand All @@ -174,6 +179,7 @@ func TestCreateAccessIdentityProvider(t *testing.T) {
assert.Equal(t, want, actual)
}
}

func TestUpdateAccessIdentityProvider(t *testing.T) {
setup()
defer teardown()
Expand Down

0 comments on commit 5c609a3

Please sign in to comment.