Class XmlRpcAuthenticationServer
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.auth.XmlRpcAuthenticationServer
-
- All Implemented Interfaces:
RemoteAuthenticationServer
public class XmlRpcAuthenticationServer extends Object implements RemoteAuthenticationServer
- Author:
- Pavel.Sher Date: 18.01.2007
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverProxy.RemoteAuthenticationServer
REMOTE_AUTH_SERVER, XML_RPC_SESSION_COOKIE
-
-
Constructor Summary
Constructors Constructor Description XmlRpcAuthenticationServer(ServerLoginModel serverLoginModel, XmlRpcSessionManager sessionManager, TwoFactorPasswordManager twoFactorPasswordManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
authenticate(String username, String encryptedPassword)
Authenticates user using specified credentials.String
getDisplayVersion()
Current server display version number.String
getFullServerVersion()
Description of server version.String
getPublicKey()
Returns hex encoded RSA public key.String
getServerBuildNumber()
Current server build numberString
getServerVersion()
Return current server protocol versionboolean
logout()
Invalidates current session.
-
-
-
Constructor Detail
-
XmlRpcAuthenticationServer
public XmlRpcAuthenticationServer(ServerLoginModel serverLoginModel, XmlRpcSessionManager sessionManager, TwoFactorPasswordManager twoFactorPasswordManager)
-
-
Method Detail
-
getPublicKey
public String getPublicKey()
Description copied from interface:RemoteAuthenticationServer
Returns hex encoded RSA public key. Returned public key has following format:
<hex encoded modulus>:<hex encoded exponent>- Specified by:
getPublicKey
in interfaceRemoteAuthenticationServer
- Returns:
- hex encoded modulus
-
authenticate
public String authenticate(String username, String encryptedPassword) throws AuthenticationFailedException
Description copied from interface:RemoteAuthenticationServer
Authenticates user using specified credentials. If authentication was successful returns session identifier and user id separated by ':'. If authentication failed throws AuthenticationFailedException.- Specified by:
authenticate
in interfaceRemoteAuthenticationServer
- Parameters:
username
- user nameencryptedPassword
- password encrypted by server public key (hex encoded)- Returns:
- session identifier
- Throws:
AuthenticationFailedException
- if authentication failed
-
logout
public boolean logout()
Description copied from interface:RemoteAuthenticationServer
Invalidates current session.- Specified by:
logout
in interfaceRemoteAuthenticationServer
- Returns:
- true if authenticated session was found and removed and false otherwise
-
getServerVersion
public String getServerVersion()
Description copied from interface:RemoteAuthenticationServer
Return current server protocol version- Specified by:
getServerVersion
in interfaceRemoteAuthenticationServer
- Returns:
- current server version, like 3.0.1
-
getServerBuildNumber
public String getServerBuildNumber()
Description copied from interface:RemoteAuthenticationServer
Current server build number- Specified by:
getServerBuildNumber
in interfaceRemoteAuthenticationServer
- Returns:
- server build number, like 4332 or SNAPSHOT
-
getDisplayVersion
public String getDisplayVersion()
Description copied from interface:RemoteAuthenticationServer
Current server display version number.- Specified by:
getDisplayVersion
in interfaceRemoteAuthenticationServer
- Returns:
- server display version like 3.0 or '3.0 EAP'
-
getFullServerVersion
public String getFullServerVersion()
Description copied from interface:RemoteAuthenticationServer
Description of server version.- Specified by:
getFullServerVersion
in interfaceRemoteAuthenticationServer
- Returns:
- XStreamed ServerVersionInfo object as string
-
-