DidRotationService
interface DidRotationService
DID Rotation Service.
Handles rotation of DIDs and their verification methods, following best practices for key rotation and DID lifecycle management.
Rotation Types:
Key Rotation: Rotate individual verification methods
DID Rotation: Rotate entire DID (create new DID, migrate relationships)
Controller Rotation: Change controller of a DID
Best Practices:
Maintain backward compatibility during rotation
Preserve relationships and services
Update all dependent systems
Maintain audit trail
Example Usage:
val rotationService = DefaultDidRotationService(
registrar = registrar,
resolver = resolver
)
// Rotate a verification method
val result = rotationService.rotateVerificationMethod(
did = Did("did:web:example.com"),
oldKeyId = "did:web:example.com#key-1",
newKey = newVerificationMethod
)Content copied to clipboard
Inheritors
Functions
Link copied to clipboard
Update controller of a DID.
Link copied to clipboard
Rotate the entire DID (create new DID and migrate).
Link copied to clipboard
abstract suspend fun rotateVerificationMethod(did: Did, oldKeyId: String, newKey: VerificationMethod): RotationResult
Rotate a verification method in a DID document.