shared library for managing external user accounts

This commit is contained in:
Dan Cech
2018-04-17 14:06:25 -04:00
parent 1594ceeb6f
commit 1c5afa731f
23 changed files with 525 additions and 263 deletions
+2
View File
@@ -51,6 +51,7 @@ func (s *SocialGrafanaCom) IsOrganizationMember(organizations []OrgRecord) bool
func (s *SocialGrafanaCom) UserInfo(client *http.Client, token *oauth2.Token) (*BasicUserInfo, error) {
var data struct {
Id int `json:"id"`
Name string `json:"name"`
Login string `json:"username"`
Email string `json:"email"`
@@ -69,6 +70,7 @@ func (s *SocialGrafanaCom) UserInfo(client *http.Client, token *oauth2.Token) (*
}
userInfo := &BasicUserInfo{
Id: fmt.Sprintf("%d", data.Id),
Name: data.Name,
Login: data.Login,
Email: data.Email,
+1
View File
@@ -14,6 +14,7 @@ import (
)
type BasicUserInfo struct {
Id string
Name string
Email string
Login string