1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
<!doctype html>
<html>
<head>
<title>Social Auth Pyramid Example</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
</head>
<body>
<a href="${request.route_url('social.auth', backend='google-oauth2')}">Google OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='google-oauth')}">Google OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='google')}">Google OpenId</a> <br />
<a href="${request.route_url('social.auth', backend='twitter')}">Twitter OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='yahoo')}">Yahoo OpenId</a> <br />
<a href="${request.route_url('social.auth', backend='yahoo-oauth')}">Yahoo OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='stripe')}">Stripe OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='facebook')}">Facebook OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='facebook-app')}">Facebook App</a> <br />
<a href="${request.route_url('social.auth', backend='angel')}">Angel OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='behance')}">Behance OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='bitbucket')}">Bitbucket OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='box')}">Box OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='linkedin')}">LinkedIn OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='github')}">Github OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='foursquare')}">Foursquare OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='instagram')}">Instagram OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='live')}">Live OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='vk-oauth2')}">VK.com OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='dailymotion')}">Dailymotion OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='disqus')}">Disqus OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='dropbox')}">Dropbox OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='evernote-sandbox')}">Evernote OAuth (sandbox mode)</a> <br />
<a href="${request.route_url('social.auth', backend='fitbit')}">Fitbit OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='flickr')}">Flickr OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='soundcloud')}">Soundcloud OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='thisismyjam')}">ThisIsMyJam OAuth1</a> <br />
<a href="${request.route_url('social.auth', backend='stocktwits')}">Stocktwits OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='tripit')}">Tripit OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='clef')}">Clef OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='twilio')}">Twilio</a> <br />
<a href="${request.route_url('social.auth', backend='xing')}">Xing OAuth</a> <br />
<a href="${request.route_url('social.auth', backend='yandex-oauth2')}">Yandex OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='podio')}">Podio OAuth2</a> <br />
<a href="${request.route_url('social.auth', backend='reddit')}">Reddit OAuth2</a> <br />
<form action="${request.route_url('social.auth', backend='openid')}" method="post">
<input id="_csrf" type="hidden" value="${request.session.get_csrf_token()}"/>
<div>
<label for="openid_identifier">OpenId provider</label>
<input id="openid_identifier" type="text" value="" name="openid_identifier" />
<input type="submit" value="Login" />
</div>
</form>
<form action="${request.route_url('social.auth', backend='livejournal')}" method="post">
<input id="_csrf" type="hidden" value="${request.session.get_csrf_token()}"/>
<div>
<label for="openid_lj_identifier">LiveJournal ID</label>
<input id="openid_lj_identifier" type="text" value="" name="openid_lj_user" />
<input type="submit" value="Login" />
</div>
</form>
<form method="post" action="${request.route_url('social.complete', backend='person')}">
<input id="_csrf" type="hidden" value="${request.session.get_csrf_token()}"/>
<input type="hidden" name="assertion" value="" />
<a rel="nofollow" id="persona" href="#">Persona</a>
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script src="https://login.persona.org/include.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#persona').on('click', function (e) {
e.preventDefault();
var self = $(this);
navigator.id.get(function (assertion) {
if (assertion) {
self.parent('form')
.find('input[type=hidden]')
.attr('value', assertion)
.end()
.submit();
} else {
alert('Some error occurred');
}
});
});
});
</script>
</body>
</html>
|