
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@postnord/uas-sdk
Advanced tools
npm i @postnord/uas-sdk
import UAS from '@postnord/uas-sdk'
const uasService = new UAS({ isStaging: !!process.env.IS_STAGING })
const run = async () => {
  // Call the getUser function with either an IAM accessToken or a JWT already issued by the UAS service
  const user = await uasService.getUser({ accessToken: '' } )
  // OR
  const user = await uasService.getUser({ jwtToken: '' } )
  // returns a boolean indicating whether the user has the specified authority on the specified customer number
  user.verifyUserAccess({ authorityNumber: '3', customerNumber: '20137458' }) 
  // verify that the user is a Postnord admin and has the authority specified in the argument
  user.verifyAdminAccess({ authorityNumber: '19' })
  // returns the unflattened view of the token object. See TS types.
  user.getDecodedToken() 
  // returns the full JWT string
  user.getSignedToken() 
  // returns a boolean indicating whether or not the issued JWT is expired
  user.isExpired() 
  // This will call UAS with the returned token to verify the signature
  await user.verifyTokenSignature() 
}
See accompanied types
Use Typescript
Hit us up at the #customerportal-user Slack channel
FAQs
An SDK to implement the APIs offered by User Authority Service
The npm package @postnord/uas-sdk receives a total of 0 weekly downloads. As such, @postnord/uas-sdk popularity was classified as not popular.
We found that @postnord/uas-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 53 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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.