Documentation ¶
Index ¶
- Constants
- func CreateJWTToken(apiKey, apiSecret string, tokenDuration time.Duration) (*jwt.Token, string, error)
- func CredentialsServerToServerOAuth2(clientID, clientSecret, accountID string) goauth.Credentials
- func NewClient(apiKey, apiSecret string, tokenDuration time.Duration) (*http.Client, error)
- func NewClientToken(bearerToken string) *http.Client
- func ZoomUserToScimUser(nativeUser ZoomUser) (scim.User, error)
- type ClientUtil
- type ZoomUser
Constants ¶
View Source
const ( ZoomAPIOAuth2AuthzURL = endpoints.ZoomAuthzURL ZoomAPIOAuth2TokenURL = endpoints.ZoomTokenURL // #nosec G101 ZoomAPIURLBase = "https://api.zoom.us/v2/" ZoomAPIURLUsers = "https://api.zoom.us/v2/users/" ZoomAPIURLUsersMe = "https://api.zoom.us/v2/users/me" ZoomAPIUserIDMe = "me" )
View Source
const ( EnvZoomAPIKey = "ZOOM_API_KEY" // #nosec G101 EnvZoomAPISecret = "ZOOM_API_SECRET" HeaderUserAgentJWTValue = "Zoom-api-Jwt-Request" )
View Source
const ( EnvZoomClientID = "ZOOM_CLIENT_ID" EnvZoomCLientSecret = "ZOOM_CLIENT_SECRET" // #nosec G101 EnvZoomApplicationID = "ZOOM_APPLICATION_ID" )
Variables ¶
This section is empty.
Functions ¶
func CreateJWTToken ¶ added in v0.21.1
func CredentialsServerToServerOAuth2 ¶ added in v0.21.1
func CredentialsServerToServerOAuth2(clientID, clientSecret, accountID string) goauth.Credentials
CredentialsServerToServerOAuth2 implements Zoom's Server-to-Server OAuth 2.0 flow described here: https://developers.zoom.us/docs/internal-apps/s2s-oauth/ .
func NewClientToken ¶
Types ¶
type ClientUtil ¶
type ClientUtil struct { Client *http.Client UserNative ZoomUser `json:"user,omitempty"` UserScim scim.User UserLoaded bool }
func NewClientUtil ¶
func NewClientUtil(client *http.Client) ClientUtil
func (*ClientUtil) GetSCIMUser ¶
func (apiutil *ClientUtil) GetSCIMUser() (scim.User, error)
func (*ClientUtil) LoadUser ¶
func (apiutil *ClientUtil) LoadUser() error
func (*ClientUtil) SetClient ¶
func (apiutil *ClientUtil) SetClient(client *http.Client)
type ZoomUser ¶
type ZoomUser struct { ID string `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Type int `json:"type"` RoleName string `json:"role_name"` PMI int `json:"pmi"` UsePMI bool `json:"use_pmi"` PersonalMeetingURL string `json:"personal_meeting_url"` Timezone string `json:"timezone"` Verified int `json:"verified"` Dept string `json:"dept"` CreatedAt time.Time `json:"created_at"` LastLoginTime time.Time `json:"last_login_time"` LastClientVersion string `json:"last_client_version"` PicURL string `json:"pic_url"` HostKey string `json:"host_key"` JID string `json:"jid"` GroupIDs []string `json:"group_ids"` IMGroupIDs []string `json:"im_group_ids"` AccountID string `json:"account_id"` Language string `json:"language"` PhoneCountry string `json:"phone_country"` PhoneNumber string `json:"phone_number"` Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.