mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Rename remote-server to connection.
This commit is contained in:
@@ -4,12 +4,12 @@
|
|||||||
<authorize username="USERNAME" password="PASSWORD">
|
<authorize username="USERNAME" password="PASSWORD">
|
||||||
|
|
||||||
<!-- Single authorized connection -->
|
<!-- Single authorized connection -->
|
||||||
<remote-server servername="localhost">
|
<connection name="localhost">
|
||||||
<protocol>vnc</protocol>
|
<protocol>vnc</protocol>
|
||||||
<param name="hostname">localhost</param>
|
<param name="hostname">localhost</param>
|
||||||
<param name="port">5900</param>
|
<param name="port">5900</param>
|
||||||
<param name="password">VNCPASS</param>
|
<param name="password">VNCPASS</param>
|
||||||
</remote-server>
|
</connection>
|
||||||
|
|
||||||
</authorize>
|
</authorize>
|
||||||
|
|
||||||
@@ -21,20 +21,20 @@
|
|||||||
encoding="md5">
|
encoding="md5">
|
||||||
|
|
||||||
<!-- First authorized connection -->
|
<!-- First authorized connection -->
|
||||||
<remote-server servername="localhost">
|
<connection name="localhost">
|
||||||
<protocol>vnc</protocol>
|
<protocol>vnc</protocol>
|
||||||
<param name="hostname">localhost</param>
|
<param name="hostname">localhost</param>
|
||||||
<param name="port">5901</param>
|
<param name="port">5901</param>
|
||||||
<param name="password">VNCPASS</param>
|
<param name="password">VNCPASS</param>
|
||||||
</remote-server>
|
</connection>
|
||||||
|
|
||||||
<!-- Second authorized connection -->
|
<!-- Second authorized connection -->
|
||||||
<remote-server servername="otherhost">
|
<connection name="otherhost">
|
||||||
<protocol>vnc</protocol>
|
<protocol>vnc</protocol>
|
||||||
<param name="hostname">otherhost</param>
|
<param name="hostname">otherhost</param>
|
||||||
<param name="port">5900</param>
|
<param name="port">5900</param>
|
||||||
<param name="password">VNCPASS</param>
|
<param name="password">VNCPASS</param>
|
||||||
</remote-server>
|
</connection>
|
||||||
|
|
||||||
</authorize>
|
</authorize>
|
||||||
|
|
||||||
|
@@ -250,7 +250,7 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
private enum State {
|
private enum State {
|
||||||
ROOT,
|
ROOT,
|
||||||
USER_MAPPING,
|
USER_MAPPING,
|
||||||
REMOTE_SERVER,
|
CONNECTION,
|
||||||
AUTH_INFO,
|
AUTH_INFO,
|
||||||
PROTOCOL,
|
PROTOCOL,
|
||||||
PARAMETER,
|
PARAMETER,
|
||||||
@@ -260,7 +260,7 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
private State state = State.ROOT;
|
private State state = State.ROOT;
|
||||||
private AuthInfo current = null;
|
private AuthInfo current = null;
|
||||||
private String currentParameter = null;
|
private String currentParameter = null;
|
||||||
private String currentRemoteServer = null;
|
private String currentConnection = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||||
@@ -292,9 +292,9 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case REMOTE_SERVER:
|
case CONNECTION:
|
||||||
|
|
||||||
if (localName.equals("remote-server")) {
|
if (localName.equals("connection")) {
|
||||||
state = State.AUTH_INFO;
|
state = State.AUTH_INFO;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -304,7 +304,7 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
case PROTOCOL:
|
case PROTOCOL:
|
||||||
|
|
||||||
if (localName.equals("protocol")) {
|
if (localName.equals("protocol")) {
|
||||||
state = State.REMOTE_SERVER;
|
state = State.CONNECTION;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
case PARAMETER:
|
case PARAMETER:
|
||||||
|
|
||||||
if (localName.equals("param")) {
|
if (localName.equals("param")) {
|
||||||
state = State.REMOTE_SERVER;
|
state = State.CONNECTION;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,22 +371,22 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
|
|
||||||
case AUTH_INFO:
|
case AUTH_INFO:
|
||||||
|
|
||||||
if (localName.equals("remote-server")) {
|
if (localName.equals("connection")) {
|
||||||
|
|
||||||
currentRemoteServer = attributes.getValue("servername");
|
currentConnection = attributes.getValue("name");
|
||||||
if (currentRemoteServer == null)
|
if (currentConnection == null)
|
||||||
throw new SAXException("Attribute \"servername\" required for param tag.");
|
throw new SAXException("Attribute \"name\" required for param tag.");
|
||||||
|
|
||||||
current.addConfiguration(currentRemoteServer);
|
current.addConfiguration(currentConnection);
|
||||||
|
|
||||||
// Next state
|
// Next state
|
||||||
state = State.REMOTE_SERVER;
|
state = State.CONNECTION;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case REMOTE_SERVER:
|
case CONNECTION:
|
||||||
|
|
||||||
if (localName.equals("protocol")) {
|
if (localName.equals("protocol")) {
|
||||||
// Next state
|
// Next state
|
||||||
@@ -421,12 +421,12 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
switch (state) {
|
switch (state) {
|
||||||
|
|
||||||
case PROTOCOL:
|
case PROTOCOL:
|
||||||
current.getConfiguration(currentRemoteServer)
|
current.getConfiguration(currentConnection)
|
||||||
.setProtocol(str);
|
.setProtocol(str);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PARAMETER:
|
case PARAMETER:
|
||||||
current.getConfiguration(currentRemoteServer)
|
current.getConfiguration(currentConnection)
|
||||||
.setParameter(currentParameter, str);
|
.setParameter(currentParameter, str);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user