asp

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ASPEVERSION = 0

Variables

This section is empty.

Functions

func MakeCreateRequestString

func MakeCreateRequestString(a Asp, j jwk.Key, op mo.Option[internal.OptionalArgs]) mo.Result[string]

func MakeDeleteRequestString

func MakeDeleteRequestString(j jwk.Key, u string) mo.Result[string]

func MakeUpdateRequestString

func MakeUpdateRequestString(a Asp, j jwk.Key, u string, op mo.Option[internal.OptionalArgs]) mo.Result[string]

Types

type Action

type Action string

type ActionType

type ActionType struct {
	// contains filtered or unexported fields
}

type Asp

type Asp struct {
	Name        string   `validate:"required,min=1,max=100"`
	Claims      []string `validate:"required"`
	Description string   `validate:"omitempty,max=1000"`
	Color       string   `validate:"omitempty,hexcolor"`
	AvatarUrl   string   `validate:"omitempty,url"` //TODO: check if it is a image
	Email       string   `validate:"omitempty,email"`
}

func MakeAsp

func MakeAsp(name string, claims []string, description mo.Option[string], color mo.Option[string], avatarUrl mo.Option[string], email mo.Option[string]) Asp

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"`
	MiniSignPubKey string   `json:"mini_sign_pub_key,omitempty"`
	Exp            int64    `json:"exp,omitempty"`
}

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"`
	Iat        int64  `json:"iat"`
	ProfileJws string `json:"http://ariadne.id/profile_jws,omitempty"`
	AspeUri    string `json:"http://ariadne.id/aspe_uri,omitempty"`
}

Jump to

Keyboard shortcuts

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