Skip to content

Commit

Permalink
Merge pull request #166 from rolsonquadras/update-TODO
Browse files Browse the repository at this point in the history
docs: Add github issues to TODOs
  • Loading branch information
rolsonquadras authored Jan 10, 2023
2 parents ae3270b + 7a68f83 commit 79bb57b
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion cmd/wallet-sdk-gomobile/credential/memstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ type DB struct {

// NewInMemoryDB returns a new in-memory credential DB.
// It uses a network-based JSON-LD document loader.
// TODO: Support custom document loaders so that contexts can be preloaded.
// TODO: https://github.com/trustbloc/wallet-sdk/issues/160 Support custom document
// loaders so that contexts can be preloaded.
func NewInMemoryDB() *DB {
return &DB{
goAPIProvider: goapimemstorage.NewProvider(),
Expand Down
5 changes: 4 additions & 1 deletion demo/app/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Demo/Reference App

TODO: Add introduction
The TrustBloc Demo app demonstrates the wallet-sdk API usage. At a high level, the app uses the following APIs.
- Create a Decentralized Identifier (DID) API
- OpenID4CI Issuance APIs
- OpenID4VP Presentation APIs

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion pkg/common/jwt_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func getSignAlgorithmForVerificationMethod(vm *models.VerificationMethod) (strin
}

if vm.Type == JSONWebKey2020 && vm.Key.JSONWebKey != nil {
// TODO: handle more key types
// TODO: https://github.com/trustbloc/wallet-sdk/issues/161 handle more key types
if vm.Key.JSONWebKey.Crv == "Ed25519" {
return EdDSA, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/credentialquery/credentialquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (c *Instance) Query(
}
}

// TODO: remove this code after to re enable Schema check.
// TODO: https://github.com/trustbloc/wallet-sdk/issues/165 remove this code after to re enable Schema check.
for i := range query.InputDescriptors {
query.InputDescriptors[i].Schema = nil
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/did/creator/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ func (d *Creator) createDIDIonLongFormDoc(createDIDOpts *api.CreateDIDOpts) (*di
err error
)

// TODO: refactor so more code is shared between handlers for different did methods
// TODO: https://github.com/trustbloc/wallet-sdk/issues/162 refactor so more code is
// shared between handlers for different did methods
if d.keyReader == nil { // Generate a key and set the verification type on behalf of the caller.
keyID, key, err = d.keyWriter.Create(arieskms.ED25519Type)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions pkg/internal/issuermetadata/issuermetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import (
func Get(issuerURI string) (*issuer.Metadata, error) {
metadataEndpoint := issuerURI + "/.well-known/openid-configuration"

// TODO: Implement trusted list type of mechanism? The gosec warning (correctly) warns about using a variable URL.
response, err := http.Get(metadataEndpoint) //nolint: noctx,gosec // TODO: To be re-evaluated later
response, err := http.Get(metadataEndpoint) //nolint: noctx,gosec
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/localkms/localkms.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ func NewLocalKMS(cfg *Config) (*LocalKMS, error) {
// Create creates a keyset of the given keyType and then writes it to storage.
// The keyID and raw public key bytes of the newly generated keyset are returned.
func (k *LocalKMS) Create(keyType arieskms.KeyType) (string, []byte, error) {
// TODO: for keys that support afgo JWK, return afgo JWK
// TODO: https://github.com/trustbloc/wallet-sdk/issues/164 for keys that
// support afgo JWK, return afgo JWK
return k.ariesLocalKMS.CreateAndExportPubKeyBytes(keyType)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/openid4ci/clientconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (d *didResolverWrapper) Resolve(did string, _ ...vdr.DIDMethodOption) (*did
}

// ClientConfig contains the various required parameters for an OpenID4CI Interaction.
// TODO: refactor to instead require a key ID and a signer.
// TODO: https://github.com/trustbloc/wallet-sdk/issues/163 refactor to instead require a key ID and a signer.
type ClientConfig struct {
UserDID string
ClientID string
Expand Down
7 changes: 3 additions & 4 deletions pkg/openid4ci/openid4ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ func (i *Interaction) ResolveDisplay(preferredLocale string) (*credentialschema.
}

func (i *Interaction) getTokenResponse(tokenEndpointURL string, params url.Values) (*tokenResponse, error) {
// TODO: Implement trusted list type of mechanism? The gosec warning (correctly) warns about using a variable URL.
response, err := http.Post(tokenEndpointURL, //nolint: noctx,gosec // TODO: To be re-evaluated later
response, err := http.Post(tokenEndpointURL, //nolint: noctx,gosec
"application/x-www-form-urlencoded", strings.NewReader(params.Encode()))
if err != nil {
return nil, err
Expand Down Expand Up @@ -223,7 +222,7 @@ func (i *Interaction) getCredentialResponse(credentialType, credentialEndpoint,
Format: "jwt_vc",
DID: i.userDID,
Proof: proof{
ProofType: "jwt", // TODO: support other proof types
ProofType: "jwt", // TODO: https://github.com/trustbloc/wallet-sdk/issues/159 support other proof types
JWT: jwt,
},
}
Expand All @@ -233,7 +232,7 @@ func (i *Interaction) getCredentialResponse(credentialType, credentialEndpoint,
return nil, err
}

request, err := http.NewRequest(http.MethodPost, //nolint: noctx // TODO: To be re-evaluated later
request, err := http.NewRequest(http.MethodPost, //nolint: noctx
credentialEndpoint, bytes.NewReader(credentialReqBytes))
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions pkg/openid4vp/openid4vp.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ func createAuthorizedResponse(
did := kidParts[0]
presentationSubmission := presentation.CustomFields["presentation_submission"]

// TODO The following code adds jwt format along with nestedPath for vc. Remove these
// changes once AFG PEx has this support.
// TODO https://github.com/trustbloc/wallet-sdk/issues/158 The following code adds jwt format
// along with nestedPath for vc. Remove these changes once AFG PEx has this support.
presSubBytes, err := json.Marshal(presentationSubmission)
if err != nil {
return nil, fmt.Errorf("marshal pb error: %w", err)
Expand Down

0 comments on commit 79bb57b

Please sign in to comment.