5759c1862e
M0-M7 已完成:核心网关(身份/RBAC/TOTP/OIDC/SAML/Provider/配额/路由/内容策略/审计/定价)+ 资源市场(MCP/Skills/数字员工)。 含 22 个 PostgreSQL 迁移、管理端/门户端前端源码、OpenAPI 契约、部署 compose。 Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
450 B
Go
16 lines
450 B
Go
package provider
|
|
|
|
import "aigateway.local/core/internal/platform/cryptox"
|
|
|
|
var ErrCredentialKeyUnavailable = cryptox.ErrKeyUnavailable
|
|
|
|
type CredentialCipher = cryptox.Keyring
|
|
|
|
func NewCredentialCipher(encodedKey string, version int, encodedKeyring ...string) (*CredentialCipher, error) {
|
|
keyring := ""
|
|
if len(encodedKeyring) > 0 {
|
|
keyring = encodedKeyring[0]
|
|
}
|
|
return cryptox.NewKeyring(encodedKey, version, keyring, "provider-credentials")
|
|
}
|