Skip to content

Commit

Permalink
fix expires
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Koss committed Apr 14, 2024
1 parent d4204e0 commit d79a4db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/fakejwtserver/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var rootCmd = &cobra.Command{
fakeJwtServer.WithPort(port)
fakeJwtServer.WithEmail(email)
fakeJwtServer.WithGrandType(grandType)
fakeJwtServer.WithExpires(time.Duration(expiresInMinutes))
fakeJwtServer.WithExpires(time.Duration(expiresInMinutes) * time.Minute)

err := fakeJwtServer.Serve()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (f *FakeJWTServer) TokenHandler(writer http.ResponseWriter, request *http.R
Message: "Successfully created token",
AccessToken: token,
TokenType: "Bearer",
ExpiresIn: 600,
ExpiresIn: int(f.config.Expires.Seconds()),
}, "", " ")
if err != nil {
log.Printf("failed to marshal response: %v", err)
Expand Down

0 comments on commit d79a4db

Please sign in to comment.