fromJsonString static method
Converts a jsonString
to a Oauth2TokenEndpointAuthMethods
Throws a RangeError if the jsonString
is not supported
Implementation
static Oauth2TokenEndpointAuthMethods fromJsonString({
required String jsonString,
}) {
switch (jsonString) {
case "client_secret_post":
return Oauth2TokenEndpointAuthMethods.clientSecretPost;
case "client_secret_basic":
return Oauth2TokenEndpointAuthMethods.clientSecretBasic;
default:
throw RangeError(
"There's no subject type corresponding to $jsonString.");
}
}