blob: 683ed2b1c77bfb41e65114ab9dee0e83fafa04d2 (
plain) (
tree)
|
|
import { exists } from '../misc'
import { isActivityPubUrlValid } from './misc'
function isSignatureTypeValid (signatureType: string) {
return exists(signatureType) && signatureType === 'GraphSignature2012'
}
function isSignatureCreatorValid (signatureCreator: string) {
return exists(signatureCreator) && isActivityPubUrlValid(signatureCreator)
}
function isSignatureValueValid (signatureValue: string) {
return exists(signatureValue) && signatureValue.length > 0
}
// ---------------------------------------------------------------------------
export {
isSignatureTypeValid,
isSignatureCreatorValid,
isSignatureValueValid
}
|