* code for task#1581.
This commit is contained in:
1
module/sso/css/create.css
Normal file
1
module/sso/css/create.css
Normal file
@@ -0,0 +1 @@
|
||||
.instruction {margin-top:20px; padding:0 30px;}
|
||||
@@ -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;
|
||||
|
||||
@@ -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-test,POST字符串 account=admin&authcode=c44c577432230ad8e67160d3f9f0b91c。</p>
|
||||
<p> 注: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-test,POST字符串 key=20c8eb0d522d2e1a09d4ea18e4df3a59。</p>
|
||||
<p> 注: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-test,POST字符串 key=20c8eb0d522d2e1a09d4ea18e4df3a59。</p>
|
||||
<p> 注:test为应用代号,20c8eb0d522d2e1a09d4ea18e4df3a59为应用密钥</p>
|
||||
EOT;
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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';?>
|
||||
|
||||
Reference in New Issue
Block a user