Merge fb9e2d2700 into 110d51d1d7
				
					
				
			This commit is contained in:
		
						commit
						51203ea9b4
					
				|  | @ -68,6 +68,11 @@ func providerRequiresClientSecret(provider options.Provider) bool { | ||||||
| 		return false | 		return false | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	// PKCE with S256 doesn't require client secret
 | ||||||
|  | 	if provider.Type == "oidc" && provider.CodeChallengeMethod == "S256" { | ||||||
|  | 		return false | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	if provider.Type == "login.gov" { | 	if provider.Type == "login.gov" { | ||||||
| 		return false | 		return false | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -79,5 +79,35 @@ var _ = Describe("Providers", func() { | ||||||
| 			}, | 			}, | ||||||
| 			errStrings: []string{skipButtonAndMultipleProvidersMsg}, | 			errStrings: []string{skipButtonAndMultipleProvidersMsg}, | ||||||
| 		}), | 		}), | ||||||
|  | 		Entry("with oidc provider using S256 PKCE and no client secret", &validateProvidersTableInput{ | ||||||
|  | 			options: &options.Options{ | ||||||
|  | 				Providers: options.Providers{ | ||||||
|  | 					{ | ||||||
|  | 						Type:              "oidc", | ||||||
|  | 						ID:                "oidc-s256", | ||||||
|  | 						ClientID:          "client-id", | ||||||
|  | 						ClientSecret:      "", | ||||||
|  | 						ClientSecretFile:  "", | ||||||
|  | 						CodeChallengeMethod: "S256", | ||||||
|  | 					}, | ||||||
|  | 				}, | ||||||
|  | 			}, | ||||||
|  | 			errStrings: []string{}, | ||||||
|  | 		}), | ||||||
|  | 		Entry("with oidc provider using S256 PKCE and client secret", &validateProvidersTableInput{ | ||||||
|  | 			options: &options.Options{ | ||||||
|  | 				Providers: options.Providers{ | ||||||
|  | 					{ | ||||||
|  | 						Type:              "oidc", | ||||||
|  | 						ID:                "oidc-s256", | ||||||
|  | 						ClientID:          "client-id", | ||||||
|  | 						ClientSecret:      "mysecret", | ||||||
|  | 						ClientSecretFile:  "", | ||||||
|  | 						CodeChallengeMethod: "S256", | ||||||
|  | 					}, | ||||||
|  | 				}, | ||||||
|  | 			}, | ||||||
|  | 			errStrings: []string{}, | ||||||
|  | 		}), | ||||||
| 	) | 	) | ||||||
| }) | }) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue