mirror of
https://github.com/gravitational/teleport
synced 2024-10-22 18:23:25 +00:00
Merge branch 'master' into ev/512
This commit is contained in:
commit
b481739b80
|
@ -42,7 +42,7 @@ Run
|
|||
|
||||
1. `go get github.com/gravitational/teleport`
|
||||
2. `cd $GOPATH/src/github.com/gravitational/teleport`
|
||||
3. `make`
|
||||
3. `CGO_ENABLED=true make`
|
||||
|
||||
If the build was successful the binaries are here: `$GOPATH/src/github.com/gravitational/teleport/build`
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ func NewSessionResponse(ctx *SessionContext) (*CreateSessionResponse, error) {
|
|||
Type: roundtrip.AuthBearer,
|
||||
Token: webSession.WS.BearerToken,
|
||||
User: user.WebSessionInfo(),
|
||||
ExpiresIn: int(time.Now().Sub(webSession.WS.Expires) / time.Second),
|
||||
ExpiresIn: int(webSession.WS.Expires.Sub(time.Now()) / time.Second),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -319,6 +319,9 @@ func (s *WebSuite) authPackFromResponse(c *C, re *roundtrip.Response) *authPack
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if session.ExpiresIn < 0 {
|
||||
c.Errorf("expected expiry time to be in the future but got %v", session.ExpiresIn)
|
||||
}
|
||||
return &authPack{
|
||||
user: session.User.GetName(),
|
||||
session: session,
|
||||
|
|
Loading…
Reference in a new issue