Skip to main content

Module gnap

Module gnap 

Source
Expand description

GNAP (Grant Negotiation and Authorization Protocol) implementation.

This module implements the GNAP specification (draft-ietf-gnap-core-protocol), providing an emerging next-generation alternative to OAuth 2.0 with stronger cryptographic binding and a unified request structure.

§Implemented Features

  • Transaction lifecycle (create, continue, approve, deny)
  • Client key binding via JWK (ES256, RS256, EdDSA); a client key is required
  • Access granted only through a GnapAccessPolicy (default deny)
  • One-time interaction reference and hash (draft §4.2, §4.2.3)
  • Continuation token rotation on each use
  • Token management (revocation)
  • Subject information responses
  • Transaction expiration and cleanup

Structs§

GnapAccessRequest
Description of a single access right being requested
GnapClientDisplay
GnapClientInfo
GnapClientKey
Client key with proof method (draft §7.1)
GnapConfig
GnapInteractionCompletion
What the authorization server hands back to the client when the resource owner approves a transaction that uses an interaction finish method (RFC 9635 section 4.2).
GnapInteractionFinish
GnapInteractionRequirements
GnapJwk
Minimal JWK representation sufficient for GNAP key binding
GnapProof
The HTTP request a client key signs, handed to the _with_proof entry points.
GnapService
GnapSubjectRequest
Subject information the client is requesting
GnapTransactionRequest
A GNAP transaction request representing the client’s intent
GnapTransactionRequestBuilder
Builder for GnapTransactionRequest.

Traits§

GnapAccessPolicy
Decides which access rights a client key is granted.