示例#1
0
文件: auth.go 项目: keyurva/agoltools
func init() {
	agoltools.HandleFunc("/auth/signin", signIn)
	agoltools.HandleFunc("/auth/callback", callback)
	agoltools.HandleFunc("/auth/signout", signOut)

	authParams := url.Values{
		"client_id":     {config.Config.AppId},
		"redirect_uri":  {config.Config.AppBaseUrl + "/auth/callback"},
		"expiration":    {strconv.Itoa(60 * 24 * 14)}, // 2 weeks in minutes
		"response_type": {"token"},
	}
	portalAuthorizeUrl = fmt.Sprintf("%s/oauth2/authorize?%s", config.Config.PortalAPIBaseUrl, authParams.Encode())
	portalOrgAuthorizeUrlTemplate = fmt.Sprintf("%s/oauth2/authorize?%s", config.Config.PortalOrgAPIBaseUrlTemplate, authParams.Encode())
}
示例#2
0
文件: root.go 项目: keyurva/agoltools
func init() {
	agoltools.HandleFunc("/", root)
}
示例#3
0
func init() {
	agoltools.HandleFunc("/webmapurls", auth.Authenticated(getWebMapUrls))
}
示例#4
0
func init() {
	agoltools.HandleFunc("/orgusers", auth.Authenticated(getOrgUsers))
}
示例#5
0
func init() {
	agoltools.HandleFunc("/registeredapps", auth.Authenticated(getRegisteredApps))
}
示例#6
0
func init() {
	agoltools.HandleFunc("/myagol", auth.Authenticated(getMyAGOL))
}
示例#7
0
func init() {
	agoltools.HandleFunc("/addfolderservices", auth.Authenticated(addFolderServices))
}
func init() {
	agoltools.HandleFunc("/registeredappsloginstats", auth.Authenticated(getRegisteredAppsLoginStats))
}