aha

package
v0.18.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 11 Imported by: 0

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 NewClient

func NewClient(subdomain, token string) *http.Client

func NewEndpoint

func NewEndpoint(subdomain string) oauth2.Endpoint

Types

type AhaUserinfo

type AhaUserinfo struct {
	ID    string `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

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)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL