client

package
v0.0.0-...-63fccf3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertificateLevel = "QUALIFIED"
	HashType         = "SHA512"
	InteractionType  = "displayTextAndPIN"
	Timeout          = 60
	URL              = "https://sid.demo.sk.ee/smart-id-rp/v2"
)
View Source
const (
	// TypeIDC is the identity type for identity card
	TypeIDC = "IDC"
	// TypePAS is the identity type for passport
	TypePAS = "PAS"
	// TypePNO is the identity type for personal number
	TypePNO = "PNO"
)

https://github.com/SK-EID/smart-id-documentation#2322-etsisemantics-identifier

Variables

This section is empty.

Functions

func NewIdentity

func NewIdentity(typ, country, id string) string

NewIdentity creates a new identity instance

Types

type Client

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

Client holds the client configuration and the HTTP client

func NewClient

func NewClient(opts ...config.Option) (*Client, error)

NewClient creates a new Smart-ID client instance

func (*Client) Authenticate

func (c *Client) Authenticate(nationalIdentityNumber string) (*models.AuthenticateResponse, error)

Authenticate sends an authentication request to the Smart-ID provider

func (*Client) Status

func (c *Client) Status(id string) (*models.SessionResponse, error)

Status fetches the status of a Smart-ID session

type Identity

type Identity struct {
	Country string
	Type    string
	ID      string
}

func (*Identity) String

func (i *Identity) String() string

String returns a string representation

Jump to

Keyboard shortcuts

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