fromJsonString static method

Oauth2SigningAlg fromJsonString({
  1. required String jsonString,
})

Converts a jsonString to a Oauth2SigningAlg

Throws a RangeError if the jsonString is not supported

Implementation

static Oauth2SigningAlg fromJsonString({
  required String jsonString,
}) {
  switch (jsonString) {
    case "RS256":
      return Oauth2SigningAlg.RS256;

    default:
      throw RangeError(
          "There's no subject type corresponding to $jsonString.");
  }
}