Add support for SASL EXTERNAL

Can be useful when the server is using e.g. a cookie for
authentication purposes.
This commit is contained in:
Simon Ser
2021-10-12 17:29:56 +02:00
parent a890665775
commit 21a4a71542
4 changed files with 22 additions and 7 deletions
+4
View File
@@ -124,6 +124,7 @@ export default class App extends Component {
realname: null,
nick: null,
saslPlain: null,
saslExternal: false,
autoconnect: false,
autojoin: [],
},
@@ -207,6 +208,9 @@ export default class App extends Component {
if (typeof config.server.autoconnect === "boolean") {
connectParams.autoconnect = config.server.autoconnect;
}
if (config.server.auth === "external") {
connectParams.saslExternal = true;
}
}
let autoconnect = store.autoconnect.load();
+3 -1
View File
@@ -61,6 +61,8 @@ export default class ConnectForm extends Component {
username: params.username || params.nick,
password: this.state.password,
};
} else if (this.props.auth === "external") {
params.saslExternal = true;
}
this.state.autojoin.split(",").forEach(function(ch) {
@@ -112,7 +114,7 @@ export default class ConnectForm extends Component {
}
let auth = null;
if (this.props.auth !== "disabled") {
if (this.props.auth !== "disabled" && this.props.auth !== "external") {
auth = html`
<label>
Password:<br/>