authrequest

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNonce

func GenerateNonce() string

Types

type AuthenticationRequest

type AuthenticationRequest struct {
	jwt.RegisteredClaims
	Type                    string                 `json:"type"`
	Client_id               string                 `json:"client_id"`
	Redirect_uri            string                 `json:"redirect_uri"`
	Response_type           string                 `json:"response_type"`
	Response_mode           string                 `json:"response_mode"`
	Scopes                  []string               `json:"scope"`
	Nonce                   string                 `json:"nonce"`
	Presentation_definition PresentationDefinition `json:"presentation_definition"`
	Registration            Registration           `json:"registration"`
}

func New

func New(client_id string, redirect_uri string, pd PresentationDefinition, registration Registration) *AuthenticationRequest

func Parse

func Parse(tokenString string, keyFunc jwt.Keyfunc) (*AuthenticationRequest, error)

Parse is used by the SIOP to verify an Authentication Request received from a RP

func (*AuthenticationRequest) AsSerializedJWT

func (ar *AuthenticationRequest) AsSerializedJWT(privateKey crypto.PrivateKey, state string) (string, error)

AsSerializedJWT returns the AuthorizationRequest as a JWT signed by the private key

type ConstraintsField

type ConstraintsField struct {
	Path   []string               `json:"path"`
	Filter ConstraintsFieldFilter `json:"filter" mapstructure:"filter"`
}

type ConstraintsFieldFilter

type ConstraintsFieldFilter struct {
	Type    string   `json:"type"`
	Pattern []string `json:"pattern"`
}

type InputDescriptor

type InputDescriptor struct {
	Id          string                     `json:"id"`
	Name        string                     `json:"name"`
	Purpose     string                     `json:"purpose"`
	Constraints InputDescriptorConstraints `json:"constraints" mapstructure:"constraints"`
}

type InputDescriptorConstraints

type InputDescriptorConstraints struct {
	Fields []ConstraintsField `json:"fields"`
}

type JWT_VC_Format

type JWT_VC_Format struct {
	Alg []string `json:"alg"`
}

type PresentationDefinition

type PresentationDefinition struct {
	Id                string                       `json:"id"`
	Format            PresentationDefinitionFormat `json:"format" mapstructure:"format"`
	Input_descriptors []InputDescriptor            `json:"input_descriptors"`
}

type PresentationDefinitionFormat

type PresentationDefinitionFormat struct {
	Jwt_vc JWT_VC_Format `json:"jtw_vc" mapstructure:"jwt_vc"`
}

type Registration

type Registration struct {
	Subject_syntax_types_supported []string `json:"subject_syntax_types_supported"`
}

type VPToken

type VPToken struct {
	Presentation_definition PresentationDefinition `json:"presentation_definition" mapstructure:"presentation_definition"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL