1.5.0
This commit is contained in:
@@ -124,6 +124,27 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- TypeE -->
|
||||
<tbody v-show="type == 'typeE'">
|
||||
<tr>
|
||||
<td>鉴权密钥 *</td>
|
||||
<td>
|
||||
<input type="text" maxlength="40" name="typeESecret" v-model="typeESecret" autocomplete="off"/>
|
||||
<p class="comment">只能包含字母、数字,长度不超过40。<a href="" @click.prevent="generateTypeESecret()">[随机生成]</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>有效时间</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" maxlength="8" name="typeELife" value="30" style="width: 7em"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">URL 格式:<code-label>/hash/timestamp/path</code-label>;签名算法:<code-label>md5(secret + uri + timestamp)</code-label>;timestamp 为十六进制 Unix 秒数。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- BasicAuth -->
|
||||
<tbody v-show="type == 'basicAuth'">
|
||||
<tr>
|
||||
@@ -138,7 +159,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreBasicAuthOptionsVisible">
|
||||
<td>认证领域名<em>(Realm)</em></td>
|
||||
<td>认证领域名 <em>(Realm)</em></td>
|
||||
<td>
|
||||
<input type="text" name="basicAuthRealm" value="" maxlength="100"/>
|
||||
</td>
|
||||
@@ -147,7 +168,7 @@
|
||||
<td>字符集</td>
|
||||
<td>
|
||||
<input type="text" name="basicAuthCharset" style="width: 6em" maxlength="50"/>
|
||||
<p class="comment">类似于<code-label>UTF-8</code-label>。</p>
|
||||
<p class="comment">类似于 <code-label>UTF-8</code-label>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -186,7 +207,7 @@
|
||||
<td>限定文件扩展名</td>
|
||||
<td>
|
||||
<values-box name="exts"></values-box>
|
||||
<p class="comment">如果不为空,则表示只有这些扩展名的文件才需要鉴权;扩展名需要包含点符号(.),比如<code-label>.png</code-label></p>
|
||||
<p class="comment">如果不为空,则表示只有这些扩展名的文件才需要鉴权;扩展名需要包含点符号,比如 <code-label>.png</code-label></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -200,4 +221,4 @@
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@@ -84,6 +84,18 @@ Tea.context(function () {
|
||||
this.authDescription = this.authDescription.replace("t=", this.typeDTimestampParamName + "=")
|
||||
}
|
||||
|
||||
/**
|
||||
* TypeE
|
||||
*/
|
||||
this.typeESecret = ""
|
||||
|
||||
this.generateTypeESecret = function () {
|
||||
this.$post(".random")
|
||||
.success(function (resp) {
|
||||
this.typeESecret = resp.data.random
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 基本认证
|
||||
*/
|
||||
@@ -97,4 +109,4 @@ Tea.context(function () {
|
||||
* 子请求
|
||||
*/
|
||||
this.subRequestFollowRequest = 1
|
||||
})
|
||||
})
|
||||
|
||||
@@ -122,6 +122,27 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- TypeE -->
|
||||
<tbody v-show="type == 'typeE'">
|
||||
<tr>
|
||||
<td>鉴权密钥 *</td>
|
||||
<td>
|
||||
<input type="text" maxlength="40" name="typeESecret" v-model="typeESecret" autocomplete="off"/>
|
||||
<p class="comment">只能包含字母、数字,长度不超过40。<a href="" @click.prevent="generateTypeESecret()">[随机生成]</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>有效时间</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" maxlength="8" name="typeELife" value="30" style="width: 7em" v-model="policy.params.life"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">URL 格式:<code-label>/hash/timestamp/path</code-label>;签名算法:<code-label>md5(secret + uri + timestamp)</code-label>;timestamp 为十六进制 Unix 秒数。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- BasicAuth -->
|
||||
<tbody v-show="type == 'basicAuth'">
|
||||
<tr>
|
||||
@@ -136,7 +157,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreBasicAuthOptionsVisible">
|
||||
<td>认证领域名<em>(Realm)</em></td>
|
||||
<td>认证领域名 <em>(Realm)</em></td>
|
||||
<td>
|
||||
<input type="text" name="basicAuthRealm" value="" maxlength="100" v-model="policy.params.realm"/>
|
||||
</td>
|
||||
@@ -145,7 +166,7 @@
|
||||
<td>字符集</td>
|
||||
<td>
|
||||
<input type="text" name="basicAuthCharset" style="width: 6em" v-model="policy.params.charset" maxlength="50"/>
|
||||
<p class="comment">类似于<code-label>utf-8</code-label>。</p>
|
||||
<p class="comment">类似于 <code-label>utf-8</code-label>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -185,7 +206,7 @@
|
||||
<td>限定文件扩展名</td>
|
||||
<td>
|
||||
<values-box name="exts" :v-values="policy.params.exts"></values-box>
|
||||
<p class="comment">如果不为空,则表示只有这些扩展名的文件才需要鉴权;扩展名需要包含点符号(.),比如<code-label>.png</code-label></p>
|
||||
<p class="comment">如果不为空,则表示只有这些扩展名的文件才需要鉴权;扩展名需要包含点符号,比如 <code-label>.png</code-label></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -203,4 +224,4 @@
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@@ -115,6 +115,22 @@ Tea.context(function () {
|
||||
this.authDescription = this.authDescription.replace("t=", this.typeDTimestampParamName + "=")
|
||||
}
|
||||
|
||||
/**
|
||||
* TypeE
|
||||
*/
|
||||
this.typeESecret = ""
|
||||
|
||||
if (this.policy.type == "typeE") {
|
||||
this.typeESecret = this.policy.params.secret
|
||||
}
|
||||
|
||||
this.generateTypeESecret = function () {
|
||||
this.$post(".random")
|
||||
.success(function (resp) {
|
||||
this.typeESecret = resp.data.random
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 基本鉴权
|
||||
*/
|
||||
@@ -128,4 +144,4 @@ Tea.context(function () {
|
||||
* 子请求
|
||||
*/
|
||||
this.subRequestFollowRequest = (this.policy.params.method != null && this.policy.params.method.length > 0) ? 0 : 1
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user