Server-to-server Authentication
$ openssl ecparam -name prime256v1 -genkey -noout -out key.pem$ openssl ec -in key.pem -pubout -out public.pem{ "iss": "serviceaccount:<service_account_id>", "sub": "serviceaccount:<service_account_id>", "iat": 1511900000, "exp": 1511903600 }var jwt = require('jsonwebtoken') var opts = { algorithm: "ES256", issuer: "serviceaccount:server", subject: "serviceaccount:server", expiresIn: 60 } var token = jwt.sign({}, privateKeyPEM, opts)GET /api/v2/users HTTP/1.1 Host: testing.authcore.io Authorization: Bearer <SIGNED_JWT> Content-Type: application/json
Last updated
Was this helpful?