Documentation ¶
Index ¶
Constants ¶
View Source
const ( APIMeURL = "https://secure.aha.io/api/v1/me" AuthURLFormat = "https://%s.aha.io/oauth/authorize" TokenURLFormat = "https://%s.aha.io/oauth/token" // #nosec G101 AhaAccountHeader = "X-AHA-ACCOUNT" )
Variables ¶
View Source
var ( AhaAccountEnv = "AHA_ACCOUNT" AhaAPIKeyEnv = "AHA_API_KEY" // #nosec G101 )
Functions ¶
func NewEndpoint ¶
Types ¶
type AhaUserinfo ¶
type AhaUserinfoWrap ¶
type AhaUserinfoWrap struct {
User *AhaUserinfo `json:"user,omitempty"`
}
type ClientUtil ¶
type ClientUtil struct { Client *http.Client User *AhaUserinfo `json:"user,omitempty"` }
ClientUtil is a client library to retrieve user info from the Facebook API.
func NewClientUtil ¶
func NewClientUtil(client *http.Client) ClientUtil
func (*ClientUtil) GetSCIMUser ¶
func (apiutil *ClientUtil) GetSCIMUser() (scim.User, error)
func (*ClientUtil) GetUserinfo ¶
func (apiutil *ClientUtil) GetUserinfo() (*AhaUserinfo, error)
GetUserinfo retrieves the userinfo from the https://graph.facebook.com/v2.9/{user-id} endpoint.
func (*ClientUtil) SetClient ¶
func (apiutil *ClientUtil) SetClient(client *http.Client)
Click to show internal directories.
Click to hide internal directories.