Skip to content

Commit

Permalink
added key values for tenantId and userId
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarmrr committed Jun 12, 2019
1 parent 1a7ff61 commit 009bcc4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions testapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ func (testApp *TestApp) generateToken(tenant string, name string, scope []string
hmacSampleSecret := []byte(testApp.application.Config.GetString("ISLA_JWT_SECRET"))

token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{
"iss": "http://isla.cyberinc.com",
"aud": "http://isla.cyberinc.com",
"foo": "bar",
"iat": time.Now().Unix(),
"exp": time.Now().Add(time.Minute * 60).Unix(), // Expires in 1 hour
"tenant": tenant,
"user": "00000000-0000-0000-0000-0000000000FA",
"name": name,
"scope": scope,
"admin": admin,
"iss": "http://isla.cyberinc.com",
"aud": "http://isla.cyberinc.com",
"foo": "bar",
"iat": time.Now().Unix(),
"exp": time.Now().Add(time.Minute * 60).Unix(), // Expires in 1 hour
"tenantId": "00000000-0000-0000-0000-0000000094CD",
"userId": "00000000-0000-0000-0000-0000000000FA",
"name": name,
"scope": scope,
"admin": admin,
})

// Sign and get the complete encoded token as a string using the secret
Expand Down

0 comments on commit 009bcc4

Please sign in to comment.