You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2020. It is now read-only.
I have tried to use java implemetation of HAWK but when i run the code, getting below error. Please find below code snippet and error details:
Code:
import com.wealdtech.hawk.HawkClient;
import com.wealdtech.hawk.HawkCredentials;
public class HAWKTest {
public static void main(String[] args) {
HawkCredentials hawkCredentials = new HawkCredentials.Builder().keyId("7hdfdfnV2CmW5a") .key("c3Lw6U837tmEFrlFdfsdfdsCbB5Tlhnka5g").algorithm(HawkCredentials.Algorithm.SHA256).build();
HawkClient hawkClient = new HawkClient.Builder().credentials(hawkCredentials).build();
System.out.println(hawkClient.generateAuthorizationHeader(new URI("demourl"), "POST", null,null, null, null));
}
}
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/wealdtech/DataError$Bad
at HAWKTest.main(HAWKTest.java:8)
Caused by: java.lang.ClassNotFoundException: com.wealdtech.DataError$Bad
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more