Github user tnine commented on a diff in the pull request:
https://github.com/apache/usergrid/pull/419#discussion_r43525089
--- Diff:
stack/core/src/main/java/org/apache/usergrid/persistence/CredentialsInfo.java
---
@@ -172,4 +180,42 @@ public int compareTo( CredentialsInfo o ) {
}
return o.created.compareTo( created );
}
+
+
+ /**
+ * Parse the json representation into an object
+ * @param json
+ * @return
+ */
+ public static CredentialsInfo fromJson(final Map<String, Object> json){
+ final boolean recoverable = ( boolean ) json.get( "recoverable");
+
+ final boolean encrypted = ( boolean ) json.get("encrypted");
+ final String hashType = ( String ) json.get( "hashType");
+ final long created = ( long ) json.get( "created");
+ final String secret = ( String ) json.get( "secret" );
+
+ final List<String> cryptoChain = ( List<String> ) json.get(
"cryptoChain");
+
+ Preconditions.checkNotNull(created, "created is required");
--- End diff --
No, they're usually null
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---