mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-10-30 19:58:07 +03:00
23 lines
641 B
TypeScript
23 lines
641 B
TypeScript
import { exists } from '../misc'
|
|
import { isActivityPubUrlValid } from './misc'
|
|
|
|
function isSignatureTypeValid (signatureType: string) {
|
|
return exists(signatureType) && signatureType === 'RsaSignature2017'
|
|
}
|
|
|
|
function isSignatureCreatorValid (signatureCreator: string) {
|
|
return exists(signatureCreator) && isActivityPubUrlValid(signatureCreator)
|
|
}
|
|
|
|
function isSignatureValueValid (signatureValue: string) {
|
|
return exists(signatureValue) && signatureValue.length > 0
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isSignatureTypeValid,
|
|
isSignatureCreatorValid,
|
|
isSignatureValueValid
|
|
}
|