safetycheck

command module
v0.0.0-...-039f7e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2017 License: MIT Imports: 10 Imported by: 0

README

safetycheck

Command line utility for verifying JSON Web Tokens from Google's SafetyNet API

Installation

Set GOPATH as necessary, then:

go get github.com/kianga/safetycheck

Usage

$ safetycheck < good-token.txt
{"apkCertificateDigestSha256":["K64XBz2c/rGGr8msokWAdJeevhYZztQ6S7buXfdSu4o="],"apkDigestSha256":"EC6DSwK8ODHyAc6uRpLf0QqBZkHpW7pOyJP+aVeMyv4=","apkPackageName":"com.example.package","basicIntegrity":true,"ctsProfileMatch":true,"extension":"CQHxcA1H0//M","nonce":"DMnSi/ya8fM0PLslPaHTZg==","timestampMs":1489726139356}
(exit code 0)

$ safetycheck < bad-token.txt
2017/03/17 11:32:53 Failed to validate token: Parse error: crypto/rsa: verification error
(exit code 1)

Dependencies

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL