Skip to content

Commit

Permalink
godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Sep 29, 2023
1 parent b457fb1 commit bddc1a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions vc/vc.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var errCredentialSubjectWithoutID = errors.New("credential subjects have no ID")

// ParseVerifiableCredential parses a Verifiable Credential from a string, which can be either in JSON-LD or JWT format.
// If the format is JWT, the parsed token can be retrieved using JWT().
// Note that it does not do any signature checking.
func ParseVerifiableCredential(raw string) (*VerifiableCredential, error) {
raw = strings.TrimSpace(raw)
if strings.HasPrefix(raw, "{") {
Expand Down
1 change: 1 addition & 0 deletions vc/vp.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type VerifiablePresentation struct {

// ParseVerifiablePresentation parses a Verifiable Presentation from a string, which can be either in JSON-LD or JWT format.
// If the format is JWT, the parsed token can be retrieved using JWT().
// Note that it does not do any signature checking.
func ParseVerifiablePresentation(raw string) (*VerifiablePresentation, error) {
if strings.HasPrefix(raw, "{") {
// Assume JSON-LD format
Expand Down

0 comments on commit bddc1a3

Please sign in to comment.