MCPcopy Index your code
hub / github.com/coder/coder / validateResponseTypes

Function validateResponseTypes

codersdk/oauth2_validation.go:213–221  ·  view source on GitHub ↗

validateResponseTypes validates OAuth2 response types

(responseTypes []OAuth2ProviderResponseType)

Source from the content-addressed store, hash-verified

211
212// validateResponseTypes validates OAuth2 response types
213func validateResponseTypes(responseTypes []OAuth2ProviderResponseType) error {
214 for _, responseType := range responseTypes {
215 if !isSupportedResponseType(responseType) {
216 return xerrors.Errorf("unsupported response type: %s", responseType)
217 }
218 }
219
220 return nil
221}
222
223func isSupportedResponseType(responseType OAuth2ProviderResponseType) bool {
224 return responseType == OAuth2ProviderResponseTypeCode

Callers 1

ValidateMethod · 0.85

Calls 2

isSupportedResponseTypeFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected