![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@privacybydesign/irma-jwt
Advanced tools
Readme
This module can be used for generating and verifying IRMA JWTs in the following way:
const IrmaJwt = require('@privacybydesign/irma-jwt');
const irmaJwt = new IrmaJwt(method, options);
method
concerns the algorithm that is used to sign the JWT. Currently IRMA supports the methods
hmac
for a HS256 signed JWT and publickey
for a RS256 signed JWT.options
is a struct that defines the specific options related to the chosen method
:
secretKey
field indicates the secret key that is going to be used. For the method hmac
this
field is required, since the HS256 secret key is both used for signing and verification.
For the method publickey
the secretKey is only used for signing. In that case the publicKey
is used for verification. Therefore, if you only need verification, you can omit the secretKey
field.publicKey
field indicates the public key that is going to be used. This field is only relevant
when using JWT verification using the method publickey
. Otherwise you can omit this field.iss
field concerns the name being recorded in the 'issuer' field (iss) of the JWT. This parameter is only
required if you want to sign JWTs.signSessionRequest(request)
This method signs the session request object being passed and returns the JWT.
verify(jwt)
This method verifies whether the JWT is valid according to the specified key material. It returns the JWT body of the supplied session request JWT or session result JWT, depending on the JWT type.
Below a small example of how irma-backend
can be used:
const IrmaJwt = require('@privacybydesign/irma-jwt');
const irmaJwt = new IrmaJwt('hmac', {secretKey: 'test-key', iss: 'localhost'});
const irmaRequest = {
'@context': 'https://irma.app/ld/request/disclosure/v2',
'disclose': [
[
[ 'irma-demo.MijnOverheid.ageLower.over18' ]
]
]
};
// Sign a session request
const jwt = irmaJwt.signSessionRequest(irmaRequest);
// Verify the JWT
const verifiedJwt = irmaJwt.verify(jwt);
FAQs
Backend library to make and verify IRMA JWTs
The npm package @privacybydesign/irma-jwt receives a total of 1 weekly downloads. As such, @privacybydesign/irma-jwt popularity was classified as not popular.
We found that @privacybydesign/irma-jwt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.