Documentation
¶
Index ¶
- Constants
- func CacheDir() string
- func Commands() *cli.Command
- func ConfigDir() string
- func ConfigFile() string
- func DeviceFlowLogin(clientID, clientSecret, dc, scopes string) error
- func EnsureAccessToken(config *AuthConfig, forceRefresh bool) (string, error)
- func LoadCachedAccessToken(refreshToken string) (string, time.Time, bool)
- func RefreshAccessToken(config *AuthConfig) (string, error)
- func SaveCachedAccessToken(refreshToken, accessToken string, expiresIn int) error
- func SaveClientConfig(clientID, clientSecret string) error
- func SaveTokens(refreshToken, accessToken string, expiresIn int, ...) error
- func SelfClientExchange(clientID, clientSecret, code, dc, accountsServer string) error
- func TokensFile() string
- type AuthConfig
Constants ¶
View Source
const DefaultScopes = "ZohoCliq.Webhooks.CREATE,ZohoCliq.Channels.ALL,ZohoCliq.Messages.ALL," +
"ZohoCliq.Chats.ALL,ZohoCliq.Users.ALL,ZohoCliq.Bots.ALL," +
"WorkDrive.workspace.ALL,WorkDrive.files.ALL,WorkDrive.files.sharing.ALL," +
"WorkDrive.links.ALL,WorkDrive.team.ALL,WorkDrive.teamfolders.ALL," +
"ZohoSearch.securesearch.READ," +
"ZohoWriter.documentEditor.ALL,ZohoPC.files.ALL," +
"ZohoProjects.portals.ALL,ZohoProjects.projects.ALL,ZohoProjects.tasks.ALL," +
"ZohoProjects.tasklists.ALL,ZohoProjects.timesheets.ALL,ZohoProjects.bugs.ALL," +
"ZohoProjects.events.ALL,ZohoProjects.forums.ALL,ZohoProjects.milestones.ALL," +
"ZohoProjects.documents.ALL,ZohoProjects.users.ALL," +
"ZohoCRM.modules.ALL,ZohoCRM.settings.ALL,ZohoCRM.users.ALL,ZohoCRM.org.ALL," +
"ZohoCRM.change_owner.CREATE"
Variables ¶
This section is empty.
Functions ¶
func ConfigFile ¶
func ConfigFile() string
func DeviceFlowLogin ¶
func EnsureAccessToken ¶
func EnsureAccessToken(config *AuthConfig, forceRefresh bool) (string, error)
func LoadCachedAccessToken ¶
func RefreshAccessToken ¶
func RefreshAccessToken(config *AuthConfig) (string, error)
func SaveCachedAccessToken ¶
func SaveClientConfig ¶
func SaveTokens ¶
func SelfClientExchange ¶
func TokensFile ¶
func TokensFile() string
Types ¶
type AuthConfig ¶
type AuthConfig struct {
ClientID string
ClientSecret string
RefreshToken string
DC string
AccountsURL string
APIDomain string
AccessToken string
ExpiresAt time.Time
Scopes string
Source string
}
func ResolveAuth ¶
func ResolveAuth() (*AuthConfig, error)
func (*AuthConfig) TokenValid ¶
func (c *AuthConfig) TokenValid() bool
Click to show internal directories.
Click to hide internal directories.