What?
This PR adds support for verification of profiles on cohost.
Why?
cohost is a small but growing social media site that allows users flexibility and creativity in their posting through post-specific HTML and CSS.
How?
This PR makes the following changes:
- Adds a new claim definition for cohost, relying on the existing HTTP fetcher to retrieve cohost profile pages in text mode.
Testing
I've added standard unit tests to the claimDefinitions/cohost.js file and verified a claim manually on the node REPL. This is my first time working with this codebase so there could be more to do. I'm particularly curious to verify if E.ProofAccess.GENERIC is appropriate here but am unsure how to test the browser use case.
Type ".help" for more information.
> const doip = require('./src')
undefined
> let claim = new doip.Claim("https://cohost.org/postl", "63c5fc9cb2c55fca1d1e108b05e4d0f7038f196c")
undefined
> claim.match()
undefined
> claim
Claim {
_uri: 'https://cohost.org/postl',
_fingerprint: '63c5fc9cb2c55fca1d1e108b05e4d0f7038f196c',
_status: 'matched',
_matches: [
{
serviceprovider: [Object],
match: [Object],
profile: [Object],
proof: [Object],
claim: [Array]
}
],
_verification: {}
> await claim.verify()
(node:17280) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
undefined
> claim
Claim {
_uri: 'https://cohost.org/postl',
_fingerprint: '63c5fc9cb2c55fca1d1e108b05e4d0f7038f196c',
_status: 'verified',
_matches: [
{
serviceprovider: [Object],
match: [Object],
profile: [Object],
proof: [Object],
claim: [Array]
}
result: true,
completed: true,
errors: [],
proof: { fetcher: 'http', viaProxy: false }
}
}