public class JSApiKeyManager extends JSBaseScriptableObject
Constructor and Description |
---|
JSApiKeyManager() |
Modifier and Type | Method and Description |
---|---|
void |
(JavaScript Function) deleteApiKey(java.lang.String theApiKey)
Deletes a specific API key
|
java.lang.String |
(JavaScript Function) getKey(java.lang.String theUserName,
java.lang.String theName)
Gets a key from the apikey table with theName for theUser
|
java.lang.String[] |
(JavaScript Function) getKeysByName(java.lang.String theName)
Returns an array of api key that have the given api key name
|
java.lang.String |
(JavaScript Function) getOrCreateApiKey(java.lang.String theName,
java.lang.String theUserName)
This method gets or creates a permanent API key for the calling user
|
java.lang.String |
(JavaScript Function) getOrCreateExpiringApiKey(java.lang.String theUserName,
java.lang.String theExpirationTimeInMs,
java.lang.String theKeyName)
This method gets or creates an expiring API key for the calling user
|
java.lang.String |
(JavaScript Function) getOrCreateWorkflowApiKey(java.lang.String theWorkflowName,
java.lang.String theUserName)
This gets or creates an API key that can only be used to run the specified workflow
|
java.lang.String |
(JavaScript Function) setKey(java.lang.String theUserName,
java.lang.String theName,
java.lang.String theKey)
Sets a key in the apikey table for the user with the name
|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public java.lang.String (JavaScript Function) getOrCreateWorkflowApiKey(java.lang.String theWorkflowName, java.lang.String theUserName)
theWorkflowName
- The name of the workflow this API key runstheUserName
- Optional username (current user if omitted)public java.lang.String (JavaScript Function) getOrCreateApiKey(java.lang.String theName, java.lang.String theUserName)
theName
- optional key name, may be emptytheUserName
- Optional username (current user if omitted)public java.lang.String (JavaScript Function) getOrCreateExpiringApiKey(java.lang.String theUserName, java.lang.String theExpirationTimeInMs, java.lang.String theKeyName)
theUserName
- (optional) username (current user if omitted)theExpirationTimeInMs
- (optional) time in milliseconds since the UNIX epoch (January 1, 1970 00:00:00 UTC)theKeyName
- (optional) name given given to the apikey. ex. M4sterplan, REST APIpublic void (JavaScript Function) deleteApiKey(java.lang.String theApiKey)
theApiKey
- the key to deletepublic java.lang.String (JavaScript Function) getKey(java.lang.String theUserName, java.lang.String theName)
theName
- the name of the keytheUserName
- the user to get the key forpublic java.lang.String (JavaScript Function) setKey(java.lang.String theUserName, java.lang.String theName, java.lang.String theKey)
theName
- name of the keytheUserName
- the user nametheKey
- the apikey valuepublic java.lang.String[] (JavaScript Function) getKeysByName(java.lang.String theName)
theName
- Copyright © 2017 MediaBeacon, Inc. All Rights Reserved.