예제 #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"),
	))
}
예제 #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"),
	))
}
예제 #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"),
	))
}
예제 #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"),
	))
}