Documentation ¶
Index ¶
- Constants
- Variables
- func CodeGeneratorEightDigits(secret []byte) func(state *verifiablecredstypes.StateCode) (string, error)
- func CodeGeneratorZero(_ *verifiablecredstypes.StateCode) (string, error)
- func EmbeddedPublicKeyFetcher(issuerID, keyID string) (*verifier.PublicKey, error)
- func EmbeddedPublicKeyFetcherAllowList(allowList []string) func(issuerID, keyID string) (*verifier.PublicKey, error)
- func ExtractSubjectFromVC(credential *verifiable.Credential) (string, error)
- type Client
- type Config
- type CredentialSubject
- type FlowConfig
- type JSONChallenge
- type JSONError
- type PhoneCodeSenderMockService
- type SendVerificationCodeData
- type VCIssuer
- type VerificationCodeSender
Constants ¶
View Source
const ( PathChallenge = "/challenge" PathAuthenticate = "/authenticate" PathProof = "/proof" ParamBertyID = "berty_id" ParamState = "state" ParamRedirectURI = "redirect_uri" ParamChallenge = "challenge" ParamChallengeSig = "challenge_sig" ParamCode = "code" ParamContext = "context" ParamCredentials = "credentials" ParamIdentifier = "identifier" )
View Source
const DefaultRedirectURI = "berty://vc"
Variables ¶
View Source
var ( ErrNewConfigMissing = fmt.Errorf("config is required") ErrNewConfigPrivateKeyMissing = fmt.Errorf("issuer private key is required") ErrNewConfigFlowMissing = fmt.Errorf("flow is missing") ErrNewConfigFlowTypeUnimplemented = fmt.Errorf("unimplemented flow type") ErrNewConfigFlowTypeMissing = fmt.Errorf("flow type is missing") ErrNewConfigFlowCodeGeneratorMissing = fmt.Errorf("code generator is missing") ErrNewConfigFlowCodeSenderMissing = fmt.Errorf("code emitter endpoint is required") ErrFlowStateMissing = fmt.Errorf("a state is required") ErrFlowRedirectURIMissing = fmt.Errorf("a redirect_uri is required") ErrChallengeAuthenticity = fmt.Errorf("unable to certify challenge") ErrChallengeVerify = fmt.Errorf("unable to verify challenge") ErrChallengeExpired = fmt.Errorf("expired challenge") ErrChallengeFailed = fmt.Errorf("unable to verify challenge signature") ErrMsgInvalidIdentifier = "Invalid identifier" ErrMsgUnableToSendCode = "Unable to send code" ErrMsgUnableToGenerateCode = "Unable to generate code" ErrMsgInvalidCode = "Invalid code submitted" )
Functions ¶
func CodeGeneratorEightDigits ¶ added in v2.442.0
func CodeGeneratorEightDigits(secret []byte) func(state *verifiablecredstypes.StateCode) (string, error)
func CodeGeneratorZero ¶
func CodeGeneratorZero(_ *verifiablecredstypes.StateCode) (string, error)
func EmbeddedPublicKeyFetcherAllowList ¶ added in v2.433.0
func ExtractSubjectFromVC ¶ added in v2.443.0
func ExtractSubjectFromVC(credential *verifiable.Credential) (string, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Complete ¶
func (c *Client) Complete(uri string) (string, string, *verifiable.Credential, error)
type CredentialSubject ¶
type CredentialSubject struct {
ID string `json:"id"`
}
type FlowConfig ¶
type FlowConfig struct { Type verifiablecredstypes.FlowType CodeGenerator func(state *verifiablecredstypes.StateCode) (string, error) CodeSenderClient VerificationCodeSender }
type JSONChallenge ¶
type JSONChallenge struct {
Challenge string `json:"challenge"`
}
type PhoneCodeSenderMockService ¶
func (*PhoneCodeSenderMockService) SendVerificationCode ¶
func (m *PhoneCodeSenderMockService) SendVerificationCode(ctx context.Context, in SendVerificationCodeData) error
func (*PhoneCodeSenderMockService) ValidateIdentifier ¶
type VCIssuer ¶
type VCIssuer struct {
// contains filtered or unexported fields
}
func (*VCIssuer) CreateSignedProof ¶ added in v2.433.0
func (*VCIssuer) CreateSignedProofForPeriod ¶ added in v2.433.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.