mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-02 17:15:43 +00:00
feat(credential): support custom credential ID generation (#1984)
introduces support for custom credential ID generation, allowing users to specify their own credential IDs instead of relying solely on auto-generated UUIDs.
This commit is contained in:
@@ -232,12 +232,15 @@ impl CredentialManageRpc for PeerManagerRpcService {
|
||||
)));
|
||||
};
|
||||
|
||||
let (id, secret) = global_ctx.get_credential_manager().generate_credential(
|
||||
request.groups,
|
||||
request.allow_relay,
|
||||
request.allowed_proxy_cidrs,
|
||||
ttl,
|
||||
);
|
||||
let (id, secret) = global_ctx
|
||||
.get_credential_manager()
|
||||
.generate_credential_with_id(
|
||||
request.groups,
|
||||
request.allow_relay,
|
||||
request.allowed_proxy_cidrs,
|
||||
ttl,
|
||||
request.credential_id,
|
||||
);
|
||||
|
||||
global_ctx.issue_event(crate::common::global_ctx::GlobalCtxEvent::CredentialChanged);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user