diff --git a/cmd/fakejwtserver/cmd/root.go b/cmd/fakejwtserver/cmd/root.go index a134ab4..6045912 100644 --- a/cmd/fakejwtserver/cmd/root.go +++ b/cmd/fakejwtserver/cmd/root.go @@ -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 { diff --git a/server/server.go b/server/server.go index 1b38231..2b9f58a 100644 --- a/server/server.go +++ b/server/server.go @@ -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)