Documentation
¶
Index ¶
- func B64Encode(data []byte) string
- func GenerateNonce() string
- func LEARIssuanceRequest(config *Config, learCredData *LEARIssuanceRequestBody) ([]byte, error)
- func NewCliAssertion(learCredential string, didkey string, verifierURL string, ...) (string, error)
- func NewVPToken(vcStringToken string, didkey string, privateKey *ecdsa.PrivateKey, ...) (string, error)
- func TokenRequest(tokenEndpoint string, machineCredential string, didkey string, ...) (string, error)
- type CliAssertion
- type Config
- type Environment
- type LEARIssuanceRequestBody
- type Mandatee
- type Mandator
- type OnboardServer
- type Payload
- type Power
- type SMTPConfig
- type Strings
- type VP
- type VPToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNonce ¶
func GenerateNonce() string
func LEARIssuanceRequest ¶
func LEARIssuanceRequest(config *Config, learCredData *LEARIssuanceRequestBody) ([]byte, error)
func NewCliAssertion ¶
func NewVPToken ¶
func TokenRequest ¶
Types ¶
type CliAssertion ¶
type CliAssertion struct {
jwt.RegisteredClaims
VpToken string `json:"vp_token"`
}
type Config ¶
type Config struct {
Environment Environment `json:"environment,omitempty"`
ListenAddress string `json:"listenAddress,omitempty"`
CredentialIssuancePath string `json:"credentialIssuancePath,omitempty"`
MyDidkey string `json:"mydidkey,omitempty"`
VerifierURL string `json:"verifierURL,omitempty"`
VerifierTokenEndpoint string `json:"verifierTokenEndpoint,omitempty"`
PrivateKeyFilePEM string `json:"privateKeyFilePEM,omitempty"`
MachineCredentialFile string `json:"machineCredentialFile,omitempty"`
PrivateKey *ecdsa.PrivateKey
MachineCredential string
// rest of the fields
AppName string `json:"appName,omitempty"`
ServerURL string `json:"serverURL,omitempty"`
SenderName string `json:"senderName,omitempty"`
SenderAddress string `json:"senderAddress,omitempty"`
AdminEmail string `json:"adminEmail,omitempty"`
SMTP SMTPConfig `json:"smtp,omitempty"`
SupportTeamEmail []string `json:"supportTeamEmail,omitempty"`
}
func ConfigFromMap ¶
ConfigFromMap parses and validates a configuration specified in YAML, returning the config in a struct format.
func (*Config) OverrideWith ¶
func (*Config) SetDefaults ¶
func (s *Config) SetDefaults()
type Environment ¶
type Environment string
const Development Environment = "development"
const Preproduction Environment = "preproduction"
const Production Environment = "production"
type LEARIssuanceRequestBody ¶
type LEARIssuanceRequestBody struct {
Schema string `json:"schema,omitempty"`
OperationMode string `json:"operation_mode,omitempty"`
Format string `json:"format,omitempty"`
ResponseUri string `json:"response_uri,omitempty"`
Payload Payload `json:"payload,omitempty"`
}
func ParseLEARIssuanceRequestBody ¶
func ParseLEARIssuanceRequestBody(body []byte) (*LEARIssuanceRequestBody, error)
type Mandator ¶
type Mandator struct {
OrganizationIdentifier string `json:"organizationIdentifier,omitempty"`
Organization string `json:"organization,omitempty"`
Country string `json:"country,omitempty"`
CommonName string `json:"commonName,omitempty"`
EmailAddress string `json:"emailAddress,omitempty"`
SerialNumber string `json:"serialNumber,omitempty"`
}
type OnboardServer ¶
type OnboardServer struct {
App *pocketbase.PocketBase
// contains filtered or unexported fields
}
func New ¶
func New(config *Config) *OnboardServer
New creates an instance of the Issuer, not started yet
func (*OnboardServer) Start ¶
func (is *OnboardServer) Start() error
type SMTPConfig ¶
type Strings ¶
type Strings []string
The "action" claim can either be a single string or an array. We need to serialize the claim as a single string if the array has only one element
func (Strings) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.