Comments (3)
Hi @saujam as you see in the picture, I could reproduce the issue. Due to the "inline" Result class the suffix is produced, which can not be inherited from Java.
To solve this issue, I could think of two options:
1.) Change the result type in the Key interface or
2.) Wrap the Result within a subclass for the JVM, as you see in the next screenshot, which at least works in my PoC:
I will discuss these options with the team an come back to you.
from waltid-identity.
Hi @saujam,
if you want to implement a Key in Java instead of Kotlin, you will have to extend from JavaKey
instead of Key
. There you will not have to handle suspend/coroutines or the kotlin.Result return type.
This is a stub you can utilize:
import id.walt.crypto.keys.JavaKey;
import id.walt.crypto.keys.Key;
import id.walt.crypto.keys.KeyMeta;
import id.walt.crypto.keys.KeyType;
import java.util.Map;
import kotlinx.serialization.json.JsonElement;
import kotlinx.serialization.json.JsonObject;
import org.jetbrains.annotations.NotNull;
public class MyKey extends JavaKey {
private String _xyz;
public MyKey(String xyz) {
this._xyz = xyz;
}
@NotNull
@Override
public KeyMeta javaGetMeta() {
return null;
}
@NotNull
@Override
public byte[] javaGetPublicKeyRepresentation() {
return new byte[0];
}
@NotNull
@Override
public Key javaGetPublicKey() {
return null;
}
@NotNull
@Override
public JsonElement javaVerifyJws() {
return null;
}
@NotNull
@Override
public byte[] javaVerifyRaw() {
return new byte[0];
}
@NotNull
@Override
public String javaSignJws(@NotNull byte[] plaintext, @NotNull Map<String, String> headers) {
return "";
}
@NotNull
@Override
public Object javaSignRaw(@NotNull byte[] plaintext) {
return null;
}
@NotNull
@Override
public String javaExportPEM() {
return "";
}
@NotNull
@Override
public JsonObject javaExportJWKObject() {
return null;
}
@NotNull
@Override
public String javaExportJWK() {
return "";
}
@NotNull
@Override
public String javaGetThumbprint() {
return "";
}
@NotNull
@Override
public String javaGetKeyId() {
return "";
}
@Override
public boolean javaHasPrivateKey() {
return false;
}
@NotNull
@Override
public KeyType javaGetKeyType() {
return null;
}
}
from waltid-identity.
What is the release version for java key implementation.
from waltid-identity.
Related Issues (20)
- Correcting Credential Identifier Assignment in Waltid Web Wallet HOT 1
- Create CHEQD DID (did:cheqd) feature not working HOT 1
- The endpoint `https://wallet.walt.id/exchange/issuance` could not be found in the current API. HOT 1
- `errorRedirectUri` not working in Verifier API HOT 1
- `waltid/waltid-web-wallet:latest` Docker image not working HOT 1
- did field not set as required at the `useOfferRequest` endpoint
- SQL exception not handled at the `wallet/useOfferRequest` endpoint
- Internal parsing error exposed to the user at the `/openid4vc/jwt/issue` endpoint
- Wallet api error HOT 2
- Simplify the <issuer>/raw/jwt/sign example
- Error when I docker compose up Wallet Api HOT 1
- SDK - Verify VP with JwtSignaturePolicy error HOT 2
- Error while using wallet api from Swagger UI HOT 2
- Device signature verification failing
- [Wallet] Add missing key e2e tests
- healthz endpoints for issuer- and verifier-api
- Error while using verification endpoint from wallet API HOT 1
- maven repo is missing latest release artifacts
- PKCS#11 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waltid-identity.