public class BasicLoginHandler extends Object implements QDLoginHandler
QDAuthRealm. This class parses the login string as "user:password".| Constructor and Description |
|---|
BasicLoginHandler(String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
com.devexperts.auth.AuthToken |
getAuthToken()
Returns current token or
null if not authenticated yet. |
com.dxfeed.promise.Promise<com.devexperts.auth.AuthToken> |
login(String reason)
Starts or restarts login procedure by this login handler.
|
public com.dxfeed.promise.Promise<com.devexperts.auth.AuthToken> login(String reason)
QDLoginHandlerAuthToken or throw something exception.
If handler already has AuthToken, then this method returns the completed promise.
This promise is cancelled if the connection is closed for any reason.login in interface QDLoginHandlerreason - The text prompt to login. If current auth token was rejected by server for some reason,
then it will contain the reason.AuthToken or throw something exception.public com.devexperts.auth.AuthToken getAuthToken()
QDLoginHandlernull if not authenticated yet. It is Ok if login handler already has a token even before its
login method was invoked.getAuthToken in interface QDLoginHandlernull if not authenticated yet.Copyright © 2002–2025 Devexperts LLC. All rights reserved.