AuthN Resolver SDK
SDK crate for the AuthN Resolver module, providing public API contracts for authentication in CyberFabric.
Overview
This crate defines the transport-agnostic interface for the AuthN Resolver module:
AuthNResolverClient— Async trait for consumers (authenticate bearer tokens)AuthNResolverPluginClient— Async trait for plugin implementationsAuthenticationResult— Result containing the validatedSecurityContextAuthNResolverError— Error types for authentication failuresAuthNResolverPluginSpecV1— GTS schema for plugin registration
Usage
Getting the Client
Consumers obtain the client from ClientHub:
use AuthNResolverClient;
let authn = hub.?;
Authenticating a Token
let result = authn.authenticate.await?;
let ctx = result.security_context;
println!;
println!;
println!;
AuthenticationResult
The SecurityContext carries the authenticated identity through the request pipeline. The original bearer token is preserved for downstream PDP forwarding.
Error Handling
use AuthNResolverError;
match authn.authenticate.await
Implementing a Plugin
Implement AuthNResolverPluginClient and register with a GTS instance ID:
use async_trait;
use ;
License
Apache-2.0