Package org.jgroups.protocols
Class SWIFT_PING.Keystone_V_2_0_Auth
- java.lang.Object
-
- org.jgroups.protocols.SWIFT_PING.Keystone_V_2_0_Auth
-
- All Implemented Interfaces:
SWIFT_PING.Authenticator
- Enclosing class:
- SWIFT_PING
private static class SWIFT_PING.Keystone_V_2_0_Auth extends java.lang.Object implements SWIFT_PING.Authenticator
Openstack Keytsone v2.0 authentication provider. Thread safe implementation
-
-
Field Summary
Fields Modifier and Type Field Description private java.net.URLauthUrlprivate static java.lang.StringJSON_RESPONSE_PARSING_SCRIPTprivate java.lang.Stringpasswordprivate static javax.script.ScriptEnginescriptEngineprivate static java.lang.ObjectscriptEngineLockprivate java.lang.Stringtenantprivate java.lang.Stringusername
-
Constructor Summary
Constructors Constructor Description Keystone_V_2_0_Auth(java.lang.String tenant, java.net.URL authUrl, java.lang.String username, java.lang.String password)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SWIFT_PING.Credentialsauthenticate()protected static java.util.Map<java.lang.String,java.lang.String>parseJsonResponse(java.lang.String json)voidvalidateParams()Validate SWIFT_PING config parameters
-
-
-
Field Detail
-
JSON_RESPONSE_PARSING_SCRIPT
private static final java.lang.String JSON_RESPONSE_PARSING_SCRIPT
- See Also:
- Constant Field Values
-
scriptEngineLock
private static final java.lang.Object scriptEngineLock
-
scriptEngine
private static javax.script.ScriptEngine scriptEngine
-
tenant
private final java.lang.String tenant
-
authUrl
private final java.net.URL authUrl
-
username
private final java.lang.String username
-
password
private final java.lang.String password
-
-
Method Detail
-
validateParams
public void validateParams()
Description copied from interface:SWIFT_PING.AuthenticatorValidate SWIFT_PING config parameters- Specified by:
validateParamsin interfaceSWIFT_PING.Authenticator
-
authenticate
public SWIFT_PING.Credentials authenticate() throws java.lang.Exception
- Specified by:
authenticatein interfaceSWIFT_PING.Authenticator- Throws:
java.lang.Exception
-
parseJsonResponse
protected static java.util.Map<java.lang.String,java.lang.String> parseJsonResponse(java.lang.String json) throws javax.script.ScriptException- Throws:
javax.script.ScriptException
-
-