Class Cedarling
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,uniffi.cedarling_uniffi.CedarlingInterface,uniffi.cedarling_uniffi.Disposable
public class Cedarling implements Disposable, AutoCloseable, CedarlingInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCedarling.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static Cedarling.CompanionCompanion
-
Method Summary
Modifier and Type Method Description Unitdestroy()Unitclose()final PointeruniffiClonePointer()MultiIssuerAuthorizeResultauthorizeMultiIssuer(List<TokenInput> tokens, String action, EntityData resource, String context)BatchAuthorizeMultiIssuerResponseauthorizeMultiIssuerBatch(List<TokenInput> tokens, List<BatchItem> items)Authorize a batch of multi-issuer requests against one shared token set. AuthorizeResultauthorizeUnsigned(EntityData principal, String action, EntityData resource, String context)BatchAuthorizeUnsignedResponseauthorizeUnsignedBatch(EntityData principal, List<BatchItem> items)Authorize a batch of unsigned requests against one shared principal. UnitclearDataCtx()Clear all entries from the data store. List<String>failedTrustedIssuerIds()StringgetDataCtx(String key)Get a value from the data store by key. DataEntrygetDataEntryCtx(String key)Get a data entry with full metadata by key. StringgetLogById(String id)List<String>getLogIds()List<String>getLogsByRequestId(String requestId)Get logs by request_id. List<String>getLogsByRequestIdAndTag(String requestId, String tag)Get log by request_id and tag, like composite key request_id+log_kind.List<String>getLogsByTag(String tag)Get logs by tag, like log_kindorlog level.DataStoreStatsgetStatsCtx()Get statistics about the data store. BooleanisTrustedIssuerLoadedByIss(String issClaim)BooleanisTrustedIssuerLoadedByName(String issuerId)List<DataEntry>listDataCtx()List all entries with their metadata. List<String>loadedTrustedIssuerIds()LongloadedTrustedIssuersCount()List<String>popLogs()UnitpushDataCtx(String key, String value, Long ttlSecs)Push a value into the data store with an optional TTL. BooleanremoveDataCtx(String key)Remove a value from the data store by key. UnitshutDown()Closes the connections to the Lock Server and pushes all available logs. LongtotalIssuers()-
-
Method Detail
-
uniffiClonePointer
final Pointer uniffiClonePointer()
-
authorizeMultiIssuer
MultiIssuerAuthorizeResult authorizeMultiIssuer(List<TokenInput> tokens, String action, EntityData resource, String context)
-
authorizeMultiIssuerBatch
BatchAuthorizeMultiIssuerResponse authorizeMultiIssuerBatch(List<TokenInput> tokens, List<BatchItem> items)
Authorize a batch of multi-issuer requests against one shared token set.
Tokens are validated and token/issuer entities built once, then each item is evaluated in input order. Batch-level failures (validation, JWT verification, status-list refresh) reject the whole call; per-item failures are returned as
BatchItemErrorentries that callers must inspect.
-
authorizeUnsigned
AuthorizeResult authorizeUnsigned(EntityData principal, String action, EntityData resource, String context)
-
authorizeUnsignedBatch
BatchAuthorizeUnsignedResponse authorizeUnsignedBatch(EntityData principal, List<BatchItem> items)
Authorize a batch of unsigned requests against one shared principal.
Setup work (principal build + pushed-data snapshot) runs once and each item is evaluated in input order. Returns a
BatchAuthorizeUnsignedResponsewithbatch_idand per-item results. Batch-level failures reject the whole call; per-item failures are returned asBatchItemErrorentries that callers must inspect without affecting other items.
-
clearDataCtx
Unit clearDataCtx()
Clear all entries from the data store.
-
failedTrustedIssuerIds
List<String> failedTrustedIssuerIds()
-
getDataCtx
String getDataCtx(String key)
Get a value from the data store by key. Returns None if the key doesn't exist or the entry has expired.
-
getDataEntryCtx
DataEntry getDataEntryCtx(String key)
Get a data entry with full metadata by key. Returns None if the key doesn't exist or the entry has expired.
-
getLogById
String getLogById(String id)
-
getLogsByRequestId
List<String> getLogsByRequestId(String requestId)
Get logs by request_id. Return log entries that match the given request_id.
-
getLogsByRequestIdAndTag
List<String> getLogsByRequestIdAndTag(String requestId, String tag)
Get log by request_id and tag, like composite key
request_id+log_kind. Tag can belog_kind,log_level. Return log entries that match the given request_id and tag.
-
getLogsByTag
List<String> getLogsByTag(String tag)
Get logs by tag, like
log_kindorlog level. Tag can belog_kind,log_level.
-
getStatsCtx
DataStoreStats getStatsCtx()
Get statistics about the data store.
-
isTrustedIssuerLoadedByIss
Boolean isTrustedIssuerLoadedByIss(String issClaim)
-
isTrustedIssuerLoadedByName
Boolean isTrustedIssuerLoadedByName(String issuerId)
-
listDataCtx
List<DataEntry> listDataCtx()
List all entries with their metadata. Returns a list of DataEntry objects.
-
loadedTrustedIssuerIds
List<String> loadedTrustedIssuerIds()
-
loadedTrustedIssuersCount
Long loadedTrustedIssuersCount()
-
pushDataCtx
Unit pushDataCtx(String key, String value, Long ttlSecs)
Push a value into the data store with an optional TTL. If the key already exists, the value will be replaced. If TTL is not provided, the default TTL from configuration is used.
-
removeDataCtx
Boolean removeDataCtx(String key)
Remove a value from the data store by key. Returns true if the key existed and was removed, false otherwise.
-
totalIssuers
Long totalIssuers()
-
-
-
-