Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// ExchangeToken exchanges a token to get an access and a refresh token for this client
ExchangeToken(ctx context.Context, accessToken string) (string, string, error)
// IsAccessTokenValid checks if an access token is still valid
IsAccessTokenValid(ctx context.Context, accessToken string) (bool, error)
// RefreshToken refreshes the access token
RefreshToken(ctx context.Context) (string, string, error)
// GetAccessToken returns the access token
GetAccessToken() (string, error)
// GetRefreshToken returns the refresh token
GetRefreshToken() (string, error)
// GetUserInfo returns info on the user (name, attributes, etc..)
GetUserInfo(ctx context.Context, accessToken string) (UserInfo, error)
}
Client is the client interface to AAI service
type UserInfo ¶
type UserInfo struct {
Sub string `json:"sub,omitempty"`
Name string `json:"name,omitempty"`
GivenName string `json:"given_name,omitempty"`
FamilyName string `json:"family_name,omitempty"`
MiddleName string `json:"middle_name,omitempty"`
Nickname string `json:"nickname,omitempty"`
PreferredUsername string `json:"preferred_username,omitempty"`
Profile string `json:"profile,omitempty"`
Picture string `json:"picture,omitempty"`
Website string `json:"website,omitempty"`
Email string `json:"email,omitempty"`
Gender string `json:"gender,omitempty"`
ZoneInfo string `json:"zoneinfo,omitempty"`
Locale string `json:"locale,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
Attributes map[string][]map[string]string `json:"attributes,omitempty"`
}
UserInfo provides details on the user info in an acess token
Click to show internal directories.
Click to hide internal directories.