Skip to content

Commit

Permalink
added Admin method for full token
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarmrr committed Jul 25, 2019
1 parent ad3fbfd commit 31b94ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ func (testApp *TestApp) GetAdminToken(tenantID string, userID string, scope []st
return testApp.generateToken(tenantID, userID, uuid.UUID{}.String(), "", "", "", scope, true)
}

// GetFullAdminToken returns a test token with all the fields along with different external IDs for types such as Appliance, Session, User. These external IDs are used with REST api is invoked from another REST API service as opposed to the getting hit from UI by the user.
func (testApp *TestApp) GetFullAdminToken(tenantID string, userID string, username string, name string, externalID string, externalIDType string, scope []string) string {
return testApp.generateToken(tenantID, userID, username, name, externalID, externalIDType, scope, true)
}

// GetFullToken returns a test token with all the fields along with different external IDs for types such as Appliance, Session, User. These external IDs are used with REST api is invoked from another REST API service as opposed to the getting hit from UI by the user.
func (testApp *TestApp) GetFullToken(tenantID string, userID string, username string, name string, externalID string, externalIDType string, scope []string) string {
return testApp.generateToken(tenantID, userID, username, name, externalID, externalIDType, scope, true)
return testApp.generateToken(tenantID, userID, username, name, externalID, externalIDType, scope, false)
}

// generateToken generates and return token
Expand Down

0 comments on commit 31b94ca

Please sign in to comment.