Package co.ankatech.ankasecure.sdk.model
Class SignResult.Builder
java.lang.Object
co.ankatech.ankasecure.sdk.model.SignResult.Builder
- Enclosing class:
- SignResult
Builder for constructing immutable SignResult instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddWarning(CryptoWarning warning) Adds a single warning.algorithmUsed(String algorithmUsed) Sets the algorithm used.build()Builds an immutable SignResult instance.Sets the JWS token (required).keyRequested(String keyRequested) Sets the requested key identifier.materialVersion(Integer materialVersion) Sets the key-material version that performed the operation.warnings(List<CryptoWarning> warnings) Sets the list of warnings.
-
Method Details
-
jwsToken
Sets the JWS token (required).- Parameters:
jwsToken- the Compact JWS string- Returns:
- this builder
-
keyRequested
Sets the requested key identifier.- Parameters:
keyRequested- the kid originally requested- Returns:
- this builder
-
materialVersion
Sets the key-material version that performed the operation.- Parameters:
materialVersion- the material version (ank_kv), ornullwhen not resolvable- Returns:
- this builder
-
algorithmUsed
Sets the algorithm used.- Parameters:
algorithmUsed- the algorithm identifier- Returns:
- this builder
-
warnings
Sets the list of warnings.- Parameters:
warnings- the structured warnings (will be copied)- Returns:
- this builder
-
addWarning
Adds a single warning.- Parameters:
warning- the structured warning to add- Returns:
- this builder
-
build
Builds an immutable SignResult instance.- Returns:
- the constructed SignResult
- Throws:
NullPointerException- if jwsToken is null
-