JWSProcess

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JWSProfileType = "profile"
	JWSRequestType = "request"
)

Variables

This section is empty.

Functions

func ProcessProfileJWS

func ProcessProfileJWS(requestJWs RequestJWS) mo.Result[ProfileJWS]

ProcessProfileJWS from RequestJWS to ProfileJWS

func ProcessRequestJWS

func ProcessRequestJWS(requestJWSReader io.ReadCloser) mo.Result[RequestJWS]

ProcessRequestJWS from reader to RequestJWS

Types

type ProfileJWS

type ProfileJWS struct {
	Header  jws.Headers       `json:"header"`
	Payload ProfileJWSPayload `json:"payload"`
}

ProfileJWS is struct of profile jws

type ProfileJWSPayload

type ProfileJWSPayload struct {
	Version     int      `json:"http://ariadne.id/version"`
	Type        string   `json:"http://ariadne.id/type"`
	Name        string   `json:"http://ariadne.id/name"`
	Claims      []string `json:"http://ariadne.id/claims"`
	Description string   `json:"http://ariadne.id/description,omitempty"`
	AvatarURL   string   `json:"http://ariadne.id/avatar_url,omitempty"`
	Email       string   `json:"http://ariadne.id/email,omitempty"`
	Color       string   `json:"http://ariadne.id/color,omitempty"`
	Exp         int64    `json:"http://ariadne.id/exp,omitempty"`
}

ProfileJWSPayload is struct of profile jws payload TODO:if Specification change, this struct should be changed

type RequestJWS

type RequestJWS struct {
	Header  jws.Headers       `json:"header"`
	Payload RequestJWSPayload `json:"payload"`
}

RequestJWS is struct of request jws

type RequestJWSPayload

type RequestJWSPayload struct {
	Version    int    `json:"http://ariadne.id/version"`
	Type       string `json:"http://ariadne.id/type"`
	Action     string `json:"http://ariadne.id/action"`
	ProfileJws string `json:"http://ariadne.id/profile_jws,omitempty"`
	AspeUri    string `json:"http://ariadne.id/aspe_uri,omitempty"`
	Iat        int64  `json:"iat"`
}

RequestJWSPayload is struct of request jws payload

Jump to

Keyboard shortcuts

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