|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectio.keen.client.java.ScopedKeys
public class ScopedKeys
ScopedKeys is a utility class for dealing with Keen IO Scoped Keys. You'll probably only ever need the encrypt method. However, for completeness, there's also a decrypt method.
Example usage:
String apiKey = "YOUR_API_KEY_HERE";
// create the options we'll use
Map options = new HashMap();
options.put("allowed_operations", Arrays.asList("write"));
// do the encryption
String scopedKey = ScopedKeys.encrypt(apiKey, options);
| Constructor Summary | |
|---|---|
ScopedKeys()
|
|
| Method Summary | |
|---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
decrypt(KeenClient client,
java.lang.String apiKey,
java.lang.String scopedKey)
Decrypts the given Keen IO Scoped Key with an API Key and returns the decrypted Scoped Key Options. |
static java.util.Map<java.lang.String,java.lang.Object> |
decrypt(java.lang.String apiKey,
java.lang.String scopedKey)
Decrypts the given Keen IO Scoped Key with an API Key and returns the decrypted Scoped Key Options. |
static java.lang.String |
encrypt(KeenClient client,
java.lang.String apiKey,
java.util.Map<java.lang.String,java.lang.Object> options)
Encrypts the given options with a Keen IO API Key and creates a Scoped Key. |
static java.lang.String |
encrypt(java.lang.String apiKey,
java.util.Map<java.lang.String,java.lang.Object> options)
Encrypts the given options with a Keen IO API Key and creates a Scoped Key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScopedKeys()
| Method Detail |
|---|
public static java.lang.String encrypt(java.lang.String apiKey,
java.util.Map<java.lang.String,java.lang.Object> options)
throws ScopedKeyException
apiKey - Your Keen IO API Key.options - The options you want to encrypt.
ScopedKeyException
public static java.lang.String encrypt(KeenClient client,
java.lang.String apiKey,
java.util.Map<java.lang.String,java.lang.Object> options)
throws ScopedKeyException
client - The KeenClient to use for JSON handling.apiKey - Your Keen IO API Key.options - The options you want to encrypt.
ScopedKeyException
public static java.util.Map<java.lang.String,java.lang.Object> decrypt(java.lang.String apiKey,
java.lang.String scopedKey)
throws ScopedKeyException
apiKey - Your Keen IO API Key.scopedKey - The Scoped Key you want to decrypt.
ScopedKeyException
public static java.util.Map<java.lang.String,java.lang.Object> decrypt(KeenClient client,
java.lang.String apiKey,
java.lang.String scopedKey)
throws ScopedKeyException
client - The KeenClient to use for JSON handling.apiKey - Your Keen IO API Key.scopedKey - The Scoped Key you want to decrypt.
ScopedKeyException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||