Skip to content

Commit d79a4db

Browse files
author
Patrick Koss
committed
fix expires
1 parent d4204e0 commit d79a4db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/fakejwtserver/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var rootCmd = &cobra.Command{
3737
fakeJwtServer.WithPort(port)
3838
fakeJwtServer.WithEmail(email)
3939
fakeJwtServer.WithGrandType(grandType)
40-
fakeJwtServer.WithExpires(time.Duration(expiresInMinutes))
40+
fakeJwtServer.WithExpires(time.Duration(expiresInMinutes) * time.Minute)
4141

4242
err := fakeJwtServer.Serve()
4343
if err != nil {

server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (f *FakeJWTServer) TokenHandler(writer http.ResponseWriter, request *http.R
4949
Message: "Successfully created token",
5050
AccessToken: token,
5151
TokenType: "Bearer",
52-
ExpiresIn: 600,
52+
ExpiresIn: int(f.config.Expires.Seconds()),
5353
}, "", " ")
5454
if err != nil {
5555
log.Printf("failed to marshal response: %v", err)

0 commit comments

Comments
 (0)