Versions in this module Expand all Collapse all v1 v1.0.0 Jan 17, 2023 Changes in this version + const AuthorizationCode_en + const AuthorizationCode_en_us + const Code + const CodeChallengePlain + const CodeChallengeS256 + const IdToken + const JwtProofType + const Public + const VCJsonldFormat + const VCJwtFormat + const VCJwtJsonldFormat + const VPToken + var OpenidIssuanceErrors map[string]int = map[string]int + var Rfc6749Errors map[string]int = map[string]int + func AutorizationRequestHandler(w http.ResponseWriter, r *http.Request) + func CredentialResponseError(w http.ResponseWriter, err error) + func NewDecetralizedIdentifierRegistry() *didMethodRegistry + func ProviderMetadataRequestHandler(w http.ResponseWriter, _ *http.Request) + func PushedAutorizationRequestHandler(w http.ResponseWriter, r *http.Request) + func ResponseError(w http.ResponseWriter, err error) + func SecureCompare(givenSha [64]byte, actualSha [64]byte) bool + func SetExpirationTime(expirationTime time.Duration) + func SetIssuer(issuer string) + type AuthorizationDetails struct + CredentialDefinition string + CredentialTypes []CredentialType + Format string + Type string + type AuthorizationRequest struct + AuthorizationDetails string + ClientId string + CodeChallenge string + CodeChallengeMethod CodeChallengeMethod + Nonce string + PresentDef string + PresentDefUri string + RedirectUri string + RequestUri string + ResponseType ResponseType + Scope string + State string + func GetByClientRedirectUri(clientId string, redirectUri string) (*AuthorizationRequest, error) + func GetByClientRequestUri(clientId string, requestUri string) (*AuthorizationRequest, error) + func GetByClientState(clientId string, state string) (*AuthorizationRequest, error) + func (a *AuthorizationRequest) StoreClientRedirectUri() error + func (a *AuthorizationRequest) StoreClientState() error + func (a *AuthorizationRequest) StoreRequestUri() error + func (ar *AuthorizationRequest) CreateAuthorizationRequestForm() (url.Values, error) + func (ar *AuthorizationRequest) CreateAuthorizationResponse(options ...VPTokenOption) (*url.URL, error) + func (ar *AuthorizationRequest) CreatePushedAuthorizationResponse() (PushedAuthorizationResponse, error) + func (ar *AuthorizationRequest) InitiatePresentationRequest() (string, error) + func (ar *AuthorizationRequest) PostFormAuthorizationRequest(uri url.URL) error + func (ar *AuthorizationRequest) PostFormPushedAuthorizationRequest(uri url.URL) (PushedAuthorizationResponse, error) + func (ar *AuthorizationRequest) PostFormTokenRequest(r *http.Request, uri url.URL) (TokenResponse, error) + func (ar *AuthorizationRequest) ReceiveAuthorizationResponse(r *http.Request) (AuthorizationResponse, error) + func (ar *AuthorizationRequest) RedirectPresentationRequest(w http.ResponseWriter, r *http.Request) + func (ar *AuthorizationRequest) Validate() error + type AuthorizationResponse struct + Code string + IdentityToken string + PresentSubmission string + PresentationToken string + State string + func GetByCodeGranted(code string) (*AuthorizationResponse, error) + func (a *AuthorizationResponse) StoreCodeGranted() error + type ClientMetadata map[string]interface + type CodeChallengeMethod string + func (cc CodeChallengeMethod) String() string + func (ccm CodeChallengeMethod) Validate(cc, cv string) bool + type CredentialFormat string + func (rt CredentialFormat) String() string + type CredentialRequest struct + AuthorizationDetails string + BearerTokenExpiresIn time.Duration + BearerTokenSHA512 [64]byte + CNonce string + CNonceExpiresIn time.Duration + ClientId string + CredentialDefinition json.RawMessage + CredentialTypes []string + Deferred bool + Format CredentialFormat + Proof ProofOfPossession + func GetCredentialIssuanceByCNonce(cnonce string) (*CredentialRequest, error) + func GetCredentialRequestSecure(bearerToken string) (*CredentialRequest, error) + func (c *CredentialRequest) CreateCredentialResponse(options ...CredentialResponseOption) (CredentialResponse, error) + func (c *CredentialRequest) ResolveDid(didString string) (diddoc.Document, error) + func (c *CredentialRequest) StoreCredentialRequest() error + func (c *CredentialRequest) Validate() error + type CredentialResponse struct + AcceptanceToken string + CNonce string + CNonceExpiresIn time.Duration + Credential string + Format CredentialFormat + type CredentialResponseOption func(*optionalParameters) + func WithAcceptanceTokenSigningKey(alg jwa.KeyAlgorithm, sigKey interface{}) CredentialResponseOption + func WithCredentialDeferred() CredentialResponseOption + func WithVerifiableCredentialn(vc string, f CredentialFormat) CredentialResponseOption + type CredentialSubject interface + type CredentialType string + func (cc CredentialType) String() string + type DecetralizedIdentifier interface + ResolveDid func(did string) (interface{}, error) + type DescriptorMap struct + Format string + Id string + Path string + PathNested PathNested + type ErrorResponse struct + Error string + ErrorDescription string + ErrorUri string + type GrantType string + func (gt GrantType) String() string + type Issuer interface + NewCredentialRequest func(r *http.Request, options ...TokenResponseOption) (CredentialRequest, error) + NewDeferredCredentialRequest func(r *http.Request, options ...TokenResponseOption) (CredentialRequest, error) + func NewIssuer() Issuer + type MKVStore struct + func NewMemoryKVStore() (*MKVStore, error) + func (m *MKVStore) Get(key string) (string, error) + func (m *MKVStore) GetAllKeys() ([]string, error) + func (m *MKVStore) Remove(key string) error + func (m *MKVStore) Set(key string, value string, expires time.Duration) error + type Metadata struct + ClientMetadata ClientMetadata + ProviderMetadata ProviderMetadata + ServerConfig ServerConfig + Versions map[string]float32 + type OpenIdProvider interface + InitiateIssuance func() + NewAuthorizationRequest func(r *http.Request) (AuthorizationRequest, error) + NewPushedAuthorizationRequest func(r *http.Request) (AuthorizationRequest, error) + NewTokenRequest func(r *http.Request) (TokenRequest, error) + func NewOpenIdProvider() OpenIdProvider + type PathNested struct + Format string + Path string + type PresentDef map[string]interface + type PresentationSubmission struct + DefinitionId string + DescriptorMap []DescriptorMap + Id string + type Proof struct + Jwt string + ProofType ProofType + type ProofOfPossession struct + Jwt string + ProofType ProofType + type ProofType string + type ProviderMetadata struct + AuthorizationEndpoint string + CredentialEndpoint string + CredentialsSupported []map[string]interface{} + IdTokenSigningAlgSupported []string + Issuer string + JwksUri string + PresentationFormats map[string]interface{} + PushedEndpoint string + RequirePushed bool + ResponseTypesSupported []ResponseType + SubjectTypesSupported []SubjectType + TokenEndpoint string + func GetProviderMetadata() *ProviderMetadata + type PushedAuthorizationResponse struct + ExpiresIn time.Duration + RequestUri string + type ResponseType string + func (rt ResponseType) String() string + type ServerConfig struct + ExpirationTime time.Duration + func GetServerConfig() *ServerConfig + type SubjectType string + func (cf SubjectType) String() string + type TokenRequest struct + ClientId string + Code string + CodeVerifier string + GrantType GrantType + RedirectUri string + func (tr *TokenRequest) CreateTokenResponse(options ...TokenResponseOption) (TokenResponse, error) + func (tr *TokenRequest) Validate() error + type TokenResponse struct + AccessToken string + CNonce string + CNonceExpiresIn time.Duration + ExpiresIn time.Duration + TokenType string + type TokenResponseOption func(*optionalParameters) + func WithAccessTokenSigningKey(alg jwa.KeyAlgorithm, sigKey interface{}) TokenResponseOption + type VPTokenOption func(*presentation) + func WithIdentityToken(id string) VPTokenOption + func WithPresentationSubmission(ps string) VPTokenOption + func WithVerifiablePresentation(vp string) VPTokenOption