* code for task#1581.

This commit is contained in:
xia0ta0
2013-08-02 17:20:19 +08:00
parent 12c494e162
commit 44b2bf5171
5 changed files with 27 additions and 3 deletions

View File

@@ -0,0 +1 @@
.instruction {margin-top:20px; padding:0 30px;}

View File

@@ -22,3 +22,6 @@ $lang->sso->error->title = 'Please input name';
$lang->sso->error->code = 'Please input code';
$lang->sso->error->key = 'Please input key';
$lang->sso->error->ip = 'Please input IP';
$lang->sso->instruction = <<<EOT
EOT;

View File

@@ -22,3 +22,22 @@ $lang->sso->error->title = '名称不能为空';
$lang->sso->error->code = '代号不能为空';
$lang->sso->error->key = '密钥不能为空';
$lang->sso->error->ip = 'IP列表不能为空';
$lang->sso->instruction = <<<EOT
<p><strong>示例应用</strong>:名称为"测试",代号为"test",密钥为"20c8eb0d522d2e1a09d4ea18e4df3a59"IP列表为"192.168.11.*,127.0.0.1"。</p>
<p><strong>1.用户验证</strong></p>
<p>授权应用请求禅道的用户验证API检查用户在该应用输入的用户名和密码是否正确实现单点登录。</p>
<p>API地址为sso模块的auth方法POST数据为登录用户的用户名account和密码与密钥形成的加密字符串md5(md5(password) + key)成功则返回用户信息json格式失败则返回fail。</p>
<p>示例:请求地址 http:://www.demo.com/sso-auth-testPOST字符串 account=admin&authcode=c44c577432230ad8e67160d3f9f0b91c。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;注test为应用代号c44c577432230ad8e67160d3f9f0b91为md5(md5('123456') + '20c8eb0d522d2e1a09d4ea18e4df3a59')</p>
<p><strong>2.获取用户列表</strong></p>
<p>授权应用访问禅道的用户列表API获取禅道所有用户信息。</p>
<p>API地址为sso模块的users方法POST数据为应用密钥成功返回用户列表json格式失败返回fail。</p>
<p>示例:请求地址 http:://www.demo.com/sso-users-testPOST字符串 key=20c8eb0d522d2e1a09d4ea18e4df3a59。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;注test为应用代号20c8eb0d522d2e1a09d4ea18e4df3a59为应用密钥</p>
<p><strong>3.获取部门列表</strong></p>
<p>授权应用访问禅道的部门列表API获取禅道所有部门信息。</p>
<p>API地址为sso模块的depts方法POST数据为应用密钥成功返回用户列表json格式失败返回fail。</p>
<p>示例:请求地址 http:://www.demo.com/sso-depts-testPOST字符串 key=20c8eb0d522d2e1a09d4ea18e4df3a59。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;注test为应用代号20c8eb0d522d2e1a09d4ea18e4df3a59为应用密钥</p>
EOT;

View File

@@ -17,12 +17,12 @@
</thead>
<tbody>
<?php foreach($auths as $code => $auth):?>
<tr class='a-center'>
<tr class='a-left'>
<td><?php echo $auth->title?></td>
<td><?php echo $code?></td>
<td><?php echo $auth->key?></td>
<td><?php echo $auth->ip?></td>
<td>
<td class='a-center'>
<?php
common::printIcon('sso', 'edit', "code=$code");
common::printIcon('sso', 'delete', "code=$code", '', 'list', '', 'hiddenwin');

View File

@@ -21,7 +21,8 @@
<th class='rowhead'><?php echo $lang->sso->ip;?></th>
<td><?php echo html::input('ip', '', "class='text-5' placeholder='{$lang->sso->note->ip}'");?></td>
</tr>
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
<tr><td></td><td colspan='2' class='a-left'><?php echo html::submitButton() . html::backButton();?></td></tr>
</table>
</form>
<div class="instruction"><?php echo $lang->sso->instruction;?></div>
<?php include '../../common/view/footer.html.php';?>