Exemplo n.º 1
0
// Google returns a new Google OAuth 2.0 backend endpoint.
func Google(opt ...oauth2.Option) martini.Handler {
	return NewOAuth2Provider(append(opt, oauth2.Endpoint(
		"https://accounts.google.com/o/oauth2/auth",
		"https://accounts.google.com/o/oauth2/token"),
	))
}
Exemplo n.º 2
0
func Facebook(opt ...oauth2.Option) martini.Handler {
	return NewOAuth2Provider(append(opt, oauth2.Endpoint(
		"https://www.facebook.com/dialog/oauth",
		"https://graph.facebook.com/oauth/access_token"),
	))
}
Exemplo n.º 3
0
func LinkedIn(opt ...oauth2.Option) martini.Handler {
	return NewOAuth2Provider(append(opt, oauth2.Endpoint(
		"https://www.linkedin.com/uas/oauth2/authorization",
		"https://www.linkedin.com/uas/oauth2/accessToken"),
	))
}
Exemplo n.º 4
0
// Github returns a new Github OAuth 2.0 backend endpoint.
func Github(opt ...oauth2.Option) martini.Handler {
	return NewOAuth2Provider(append(opt, oauth2.Endpoint(
		"https://github.com/login/oauth/authorize",
		"https://github.com/login/oauth/access_token"),
	))
}