33 lines
722 B
Protocol Buffer
33 lines
722 B
Protocol Buffer
syntax = "proto3";
|
||
|
||
package conf;
|
||
|
||
option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
|
||
|
||
import "google/protobuf/duration.proto";
|
||
|
||
// 认证
|
||
message Authentication {
|
||
// JWT
|
||
message Jwt {
|
||
string method = 1; // JWT签名的算法,支持算法:HS256
|
||
string key = 2; // JWT 秘钥
|
||
}
|
||
|
||
message OIDC {
|
||
string issuer_url = 1;
|
||
string audience = 2;
|
||
string method = 3; // JWT签名的算法,支持算法:HS256
|
||
}
|
||
|
||
message PresharedKey {
|
||
repeated string valid_keys = 1;
|
||
}
|
||
|
||
string type = 1;
|
||
|
||
optional Jwt jwt = 2; // JWT 认证
|
||
optional OIDC oidc = 3; // OIDC
|
||
optional PresharedKey preshared_key = 4; // 预共享密钥
|
||
}
|