Skip to content

Commit

Permalink
Explicit expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
Doridian committed Mar 30, 2024
1 parent 8522c97 commit 9b63b97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/space_age_api_web/controllers/players_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ defmodule SpaceAgeApiWeb.PlayersController do
jwt = SpaceAgeApi.Token.generate_and_sign!(%{
sub: steamid,
aud: aud,
exp: expiry,
})

single_or_404(conn, "jwt_minimal.json", %{
Expand All @@ -120,6 +121,7 @@ defmodule SpaceAgeApiWeb.PlayersController do
jwt = SpaceAgeApi.Token.generate_and_sign!(%{
sub: player.steamid,
aud: "https://api.spaceage.mp/v2/jwt/clientauth",
exp: expiry,
server: server.name,
faction_name: player.faction_name,
is_faction_leader: player.is_faction_leader,
Expand Down

0 comments on commit 9b63b97

Please sign in to comment.