mirror of https://github.com/certd/certd
Merge remote-tracking branch 'origin/v2-dev' into v2-dev
commit
abf015f485
|
@ -0,0 +1,88 @@
|
||||||
|
|
||||||
|
# 授权插件Demo
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { AccessInput, BaseAccess, IsAccess } from '@certd/pipeline';
|
||||||
|
import { isDev } from '../../utils/env.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 这个注解将注册一个授权配置
|
||||||
|
* 在certd的后台管理系统中,用户可以选择添加此类型的授权
|
||||||
|
*/
|
||||||
|
@IsAccess({
|
||||||
|
name: 'demo',
|
||||||
|
title: '授权插件示例',
|
||||||
|
icon: 'clarity:plugin-line',
|
||||||
|
desc: '',
|
||||||
|
})
|
||||||
|
export class DemoAccess extends BaseAccess {
|
||||||
|
/**
|
||||||
|
* 授权属性配置
|
||||||
|
*/
|
||||||
|
@AccessInput({
|
||||||
|
title: '密钥Id',
|
||||||
|
component: {
|
||||||
|
placeholder: 'demoKeyId',
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
demoKeyId = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 授权属性配置
|
||||||
|
*/
|
||||||
|
@AccessInput({
|
||||||
|
//标题
|
||||||
|
title: '密钥串',
|
||||||
|
component: {
|
||||||
|
//input组件的placeholder
|
||||||
|
placeholder: 'demoKeySecret',
|
||||||
|
},
|
||||||
|
//是否必填
|
||||||
|
required: true,
|
||||||
|
//改属性是否需要加密
|
||||||
|
encrypt: true,
|
||||||
|
})
|
||||||
|
//属性名称
|
||||||
|
demoKeySecret = '';
|
||||||
|
}
|
||||||
|
new DemoAccess();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# 阿里云授权
|
||||||
|
```ts
|
||||||
|
|
||||||
|
import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
|
||||||
|
|
||||||
|
@IsAccess({
|
||||||
|
name: "aliyun",
|
||||||
|
title: "阿里云授权",
|
||||||
|
desc: "",
|
||||||
|
icon: "ant-design:aliyun-outlined",
|
||||||
|
order: 0,
|
||||||
|
})
|
||||||
|
export class AliyunAccess extends BaseAccess {
|
||||||
|
@AccessInput({
|
||||||
|
title: "accessKeyId",
|
||||||
|
component: {
|
||||||
|
placeholder: "accessKeyId",
|
||||||
|
},
|
||||||
|
helper: "登录阿里云控制台->AccessKey管理页面获取。",
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
accessKeyId = "";
|
||||||
|
@AccessInput({
|
||||||
|
title: "accessKeySecret",
|
||||||
|
component: {
|
||||||
|
placeholder: "accessKeySecret",
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
encrypt: true,
|
||||||
|
helper: "注意:证书申请需要dns解析权限;其他阿里云插件,需要对应的权限,比如证书上传需要证书管理权限;嫌麻烦就用主账号的全量权限的accessKey",
|
||||||
|
})
|
||||||
|
accessKeySecret = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
new AliyunAccess();
|
||||||
|
```
|
|
@ -16,4 +16,22 @@ services:
|
||||||
# # ↓↓↓↓ ------- # 如果你服务器部署在国外,可以用这个替换上面阿里云的公共dns
|
# # ↓↓↓↓ ------- # 如果你服务器部署在国外,可以用这个替换上面阿里云的公共dns
|
||||||
# - 8.8.8.8 # 谷歌公共dns
|
# - 8.8.8.8 # 谷歌公共dns
|
||||||
# - 8.8.4.4
|
# - 8.8.4.4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## 2. 连接IPv6超时
|
||||||
|
docker-compose 需要放开IPv6网络的配置
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
certd:
|
||||||
|
networks:
|
||||||
|
- ip6net
|
||||||
|
# ↓↓↓↓ -------------------------------------------------------------- 启用ipv6网络,还需要把上面networks的注释放开
|
||||||
|
networks:
|
||||||
|
ip6net:
|
||||||
|
enable_ipv6: true
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 2001:db8::/64
|
||||||
|
|
||||||
|
```
|
||||||
|
|
|
@ -18,7 +18,7 @@ const props = defineProps<{
|
||||||
modelValue: string;
|
modelValue: string;
|
||||||
title: string;
|
title: string;
|
||||||
action: string;
|
action: string;
|
||||||
form: any;
|
form?: any;
|
||||||
button?: any;
|
button?: any;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue