Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrBearerInfoUnauthorized is returned when the bearer token is invalid or unauthorized.
Functions ¶
Types ¶
type BearerInfo ¶
type BearerInfo struct { UserID int64 `json:"user_id"` InstallationID int64 `json:"installation_id"` Region string `json:"awsRegion"` URL string `json:"url"` Meta struct { Scopes []string `json:"scopes"` } `json:"meta"` }
BearerInfo contains information about the bearer token used to authenticate with Teamwork API.
func GetBearerInfo ¶
func GetBearerInfo(ctx context.Context, resources config.Resources, token string) (*BearerInfo, error)
GetBearerInfo retrieves information about the bearer token from Teamwork API. It returns a BearerInfo struct containing the user ID, installation ID, and installation URL. If the token is invalid or unauthorized, it returns BearerInfoUnauthorizedError.
Click to show internal directories.
Click to hide internal directories.