pub fn create_token_with_time(
subject: String,
resource: String,
operation: String,
key: KeyPair,
time_config: TokenTimeConfig,
) -> Result<String, Box<dyn Error>>Expand description
Creates a biscuit token with custom time configuration.
This function creates a base64-encoded token string that grants the specified operation on the resource for the given subject with custom time settings.
§Arguments
subject- The subject (user) identifierresource- The resource identifier to grant access tooperation- The operation to grant access tokey- The key pair used to sign the tokentime_config- Time configuration for token validity
§Returns
Ok(String)- The base64-encoded token if successfulErr(Box<dyn Error>)- If token creation fails