public class EntitleLoginHandlerFactory extends Object implements com.devexperts.qd.qtp.auth.QDLoginHandlerFactory
Connection string must be specified as: <address>[auth=entitle:<token>]
, where <token>
is a signed token given to the user after successful login. Alternatively address can be specified as
<address>[auth=entitle]
and use setAppToken(String)
method to specify application token.
Modifier and Type | Class and Description |
---|---|
protected static class |
EntitleLoginHandlerFactory.AutherLoginHandler |
Modifier and Type | Field and Description |
---|---|
static String |
appToken |
static String |
ENTITLE_SCHEME
Name of the scheme to be used for authenticating clients.
|
Constructor and Description |
---|
EntitleLoginHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
com.devexperts.qd.qtp.auth.QDLoginHandler |
createLoginHandler(String login,
com.devexperts.qd.qtp.MessageAdapterConnectionFactory factory) |
static String |
createToken(String issuer,
String sessionType,
String user,
String secret)
Create and return token for the specified session and user, signed by the specified secret
|
static String |
getAppToken()
Returns global application token string.
|
static void |
setAppToken(String appToken)
Sets global application token string.
|
public static final String ENTITLE_SCHEME
public static volatile String appToken
public static String getAppToken()
public static void setAppToken(String appToken)
appToken
- public static String createToken(String issuer, String sessionType, String user, String secret)
issuer
- company owning sessions (sent as an issuer in the token)sessionType
- type of session (sent as a subject in the token)user
- user GUID (sent in the message field)secret
- random string used to sign the token (must be kept secret from client code)public com.devexperts.qd.qtp.auth.QDLoginHandler createLoginHandler(String login, com.devexperts.qd.qtp.MessageAdapterConnectionFactory factory) throws com.devexperts.util.InvalidFormatException
createLoginHandler
in interface com.devexperts.qd.qtp.auth.QDLoginHandlerFactory
com.devexperts.util.InvalidFormatException
Copyright © 2021 Devexperts. All Rights Reserved.