google / identity-toolkit-java-client

Google Identity Toolkit client library for Java
Apache License 2.0
37 stars 27 forks source link

Files and Paths objects used by the library are not supported by App Engine #44

Open mtevrst opened 8 years ago

mtevrst commented 8 years ago

This library used to work fine with previous App Engine SDKs, but I'm getting the following errors with the current version:

java.nio.file.Files is not supported by Google App Engine's Java runtime environment
java.nio.file.Paths is not supported by Google App Engine's Java runtime environment

Is there any workaround for this issue? The only place these objects have been used in the library is one line in the public static GitkitClient createFromJson() method. Is this method expendable?

eliotstock commented 8 years ago

This is disappointing to see that has been written without consideration for App Engine.

Could you do away with the configPath passed to createFromJson() and instead expect to find the JSON file on the classpath? App Engine users would put it in WEB-INF.

mtevrst commented 8 years ago

Should I expect a library update to fix this anytime soon?

liujin-google commented 8 years ago

Sorry for the late reply. Instead of calling createFromJson(), you can initialize a GitkitClient directly from GitkitClient.Builder(): https://github.com/google/identity-toolkit-java-client/blob/master/src/main/java/com/google/identitytoolkit/GitkitClient.java#L141.