Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Demo Adaptation to New Auth Page
Browse files Browse the repository at this point in the history
  • Loading branch information
xfoxfu committed Jul 26, 2015
1 parent 3653a68 commit e5b6f57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions routes/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ var config = require('config');

// GET /
router.get('/', function(req, res, next) {
var querystring=require('querystring');
res.render('demo/index', {
title: config.get('site.demo'),
banner: config.get('content.demo.banner'),
home_title: config.get('site.demo'),
uri: 'rapid://authorize/?callback=' + encodeURIComponent(config.get('server.base') + 'demo/callback?token=') +
'&app=88587CD267E00E016B545E38FD133FCA077535F9B91C0E246FCD48AA5C77996DC935833C27C9A0EC0888D15ACD941C0B461716F61EAC6B7410BB9C46642B0808BF4C32E261A40F385070B87F9CBCE3B51B20E83A8D11B08D'
uri: config.get('server.base')+'api/auth?'+querystring.stringify({callback: config.get('server.base') + 'demo/callback?token=',
app: '88587CD267E00E016B545E38FD133FCA077535F9B91C0E246FCD48AA5C77996DC935833C27C9A0EC0888D15ACD941C0B461716F61EAC6B7410BB9C46642B0808BF4C32E261A40F385070B87F9CBCE3B51B20E83A8D11B08D'})
});
});
// GET /callback
Expand Down
2 changes: 1 addition & 1 deletion views/demo/index.hbs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<h1>{{banner}}</h1>
<a class="waves-effect waves-light btn" id="login" href="{{uri}}"><i class="mdi-file-cloud left" href=""></i>用Rap-ID登陆</a>
<a class="waves-effect waves-light btn" id="login" href="{{{uri}}}"><i class="mdi-file-cloud left" href=""></i>用Rap-ID登陆</a>

0 comments on commit e5b6f57

Please sign in to comment.