diff --git a/README.md b/README.md index fba9c89..00ce858 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Encode and decode JWTs. import gwt.{type Jwt, type Verified, type Unverified} pub fn main() { - let jwt_builder = + let jwt_builder = gwt.new() |> gwt.set_subject("1234567890") |> gwt.set_audience("0987654321") @@ -19,14 +19,14 @@ pub fn main() { |> gwt.set_expiration(1_704_046_160) |> gwt.set_jwt_id("2468") - let jwt_without_signature = gwt.to_string(jwt) - let jwt_with_signature = gwt.to_signed_string(jwt, gwt.HS256, "lucy") + let jwt_without_signature = gwt.to_string(jwt_builder) + let jwt_with_signature = gwt.to_signed_string(jwt_builder, gwt.HS256, "lucy") - let assert Ok(unverified_jwt) = + let assert Ok(unverified_jwt) = jwt_without_signature |> gwt.from_string() - let assert Ok(verified_jwt) = + let assert Ok(verified_jwt) = jwt_with_signature |>gwt.from_signed_string("lucy") } @@ -35,7 +35,7 @@ pub fn main() { ## Installation ```sh -gleam add gwt +gleam add gwt ``` The documentation can be found at .