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:
@@ -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();
|
||||
|
||||
@@ -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/>
|
||||
|
||||
Reference in New Issue
Block a user