fix AccessToken struct -> User json Unmarshal

Change-Id: I4e07da36a46285c68c94ee2857a9e8f85b161e92
This commit is contained in:
Fangzhou Xu 2016-09-01 17:15:05 -07:00
parent c8dab92a7c
commit 784256a823
2 changed files with 3 additions and 2 deletions

View File

@ -42,7 +42,8 @@ func TestVerifyLocalPKIZ(t *testing.T) {
if err != nil {
t.Fatal(err)
}
fmt.Println(access)
user := access.Access.User.(map[string]interface{})
fmt.Println(user["roles"])
project := access.Access.Token.Project
if project.Name != "demo" {
t.Fail()

View File

@ -24,7 +24,7 @@ import (
type AccessType struct {
Token Token `json:"token"`
User interface{} `json:"id"`
User interface{} `json:"user"`
ServiceCatalog []ServiceCatalogEntry `json:"servicecatalog"`
}