New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

github.com/uvalib/virgo4-jwt

Package Overview
Dependencies
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/uvalib/virgo4-jwt

Source
Go Modules
Version
v1.3.3
Version published
Created
Source

Virgo4 JWT

This is the JWT library for Virgo4 services written in Go. It can mint new tokens and validate existing tokens. The example directory includes sample usage of this library.

To run the examples, execute go run example/main.go

API

This library supports a set of claims specific to Virgo4. They are found in v4jwt.V4Claims:

  • UserID
  • Barcode
  • IsUVA
  • HomeLibrary
  • Profile
  • CanPurchase
  • CanLEO
  • CanLEOPlus
  • CanPlaceReserve
  • CanUseILLiad
  • UseSIS
  • Role
  • AuthMethod

Role is an enumerated type with values: Guest, User and Admin. All but Guest require a UserID. AuthMethod is an enumarated type with values: NoAuth, PIN and Netbadge. When Role is guest this defaults to NoAuth.

There are two API calls

  • Mint(V4Claims, Duration, SigningKey) : this takes the claims, duration and key and generates a signed JWT string.
  • Validate(JWTString, SigningKey) : this validates the key for signature and expiration and returns the claims.

System Requirements

  • GO version 1.21 or greater

FAQs

Package last updated on 09 Oct 2025

Did you know?

Socket

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.

Install

Related posts