Tool for validate AdMob rewarded ads signatures SSV
npm install admob-ssvTool for validate AdMob SSV signatures from backend
* Node >= 12.0.0
Install via NPM
```
$ npm install --save admob-ssv
Or Yarn
``
$ yarn add admob-ssv
Use as ES module:
`typescript
import url from 'url';
import http from 'http';
import Verifier from 'admob-ssv';
const verifier = new Verifier();
const server = http.createServer(async (request) => {
const parts = urls.parse(request.url, true);
const isValid = await verifier.verify(parts.query);
// ...
});
`
Example with express
`typescript
import Verifier from 'admob-ssv';
const verifier = new Verifier();
app.get('/ssvcallback', (req, res, next) => {
verifier.verify(req.query)
.then((isValid) => {
if (!isValid) {
res.status(500);
res.json({
error: 'Invalid signature',
});
}
// ...
})
.catch((e) => {
return next(e);
});
});
`
`typescript
import Verifier, { KeyProvider, MemoryCache, RetryFetcher } from 'admob-ssv'
const verifier = new Verifier({
keyProvider: new KeyProvider({
cache: new MemoryCache(),
fetcher: new RetryFetcher(),
}),
})
``
We use SemVer for versioning. For the versions available, see the releases on this repository.
exos - Initial work* - exos
This project is licensed under the GPL-2.0 License.
* Bug reports and pull request are welcome 😊
* Buy me a beer 🍺: BTC 14NvJxpQsxs4EK8MTq2rubTDwuy54uCesu