Пример #1
0
func signIn(r *agoltools.Request) (err error) {
	authUrl := portalAuthorizeUrl

	if redirect := r.R.FormValue("redirect"); strings.HasPrefix(redirect, "/") {
		redirect = url.QueryEscape(redirect)
		authUrl += "&state=" + redirect
	}

	r.Redirect(authUrl)

	return nil
}
Пример #2
0
func signOut(r *agoltools.Request) (err error) {
	r.SignOut()
	r.Redirect("/")
	return nil
}