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 Stringauthenticate(String username, String encryptedPassword)Authenticates user using specified credentials.StringgetDisplayVersion()Current server display version number.StringgetFullServerVersion()Description of server version.StringgetPublicKey()Returns hex encoded RSA public key.StringgetServerBuildNumber()Current server build numberStringgetServerVersion()Return current server protocol versionbooleanlogout()Invalidates current session.
-
-
-
Constructor Detail
-
XmlRpcAuthenticationServer
public XmlRpcAuthenticationServer(ServerLoginModel serverLoginModel, XmlRpcSessionManager sessionManager, TwoFactorPasswordManager twoFactorPasswordManager)
-
-
Method Detail
-
getPublicKey
public String getPublicKey()
Description copied from interface:RemoteAuthenticationServerReturns hex encoded RSA public key. Returned public key has following format:
<hex encoded modulus>:<hex encoded exponent>- Specified by:
getPublicKeyin interfaceRemoteAuthenticationServer- Returns:
- hex encoded modulus
-
authenticate
public String authenticate(String username, String encryptedPassword) throws AuthenticationFailedException
Description copied from interface:RemoteAuthenticationServerAuthenticates user using specified credentials. If authentication was successful returns session identifier and user id separated by ':'. If authentication failed throws AuthenticationFailedException.- Specified by:
authenticatein 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:RemoteAuthenticationServerInvalidates current session.- Specified by:
logoutin interfaceRemoteAuthenticationServer- Returns:
- true if authenticated session was found and removed and false otherwise
-
getServerVersion
public String getServerVersion()
Description copied from interface:RemoteAuthenticationServerReturn current server protocol version- Specified by:
getServerVersionin interfaceRemoteAuthenticationServer- Returns:
- current server version, like 3.0.1
-
getServerBuildNumber
public String getServerBuildNumber()
Description copied from interface:RemoteAuthenticationServerCurrent server build number- Specified by:
getServerBuildNumberin interfaceRemoteAuthenticationServer- Returns:
- server build number, like 4332 or SNAPSHOT
-
getDisplayVersion
public String getDisplayVersion()
Description copied from interface:RemoteAuthenticationServerCurrent server display version number.- Specified by:
getDisplayVersionin interfaceRemoteAuthenticationServer- Returns:
- server display version like 3.0 or '3.0 EAP'
-
getFullServerVersion
public String getFullServerVersion()
Description copied from interface:RemoteAuthenticationServerDescription of server version.- Specified by:
getFullServerVersionin interfaceRemoteAuthenticationServer- Returns:
- XStreamed ServerVersionInfo object as string
-
-