accounts: Add SASL EXTERNAL handler

This commit is contained in:
Daniel Oaks
2016-09-07 21:32:58 +10:00
parent 70665850aa
commit b5e7d8968f
4 changed files with 121 additions and 40 deletions
+3 -5
View File
@@ -75,6 +75,9 @@ func NewClient(server *Server, conn net.Conn, isTLS bool) *Client {
}
if isTLS {
client.flags[TLS] = true
// error is not useful to us here anyways so we can ignore it
client.certfp, _ = client.socket.CertFP()
}
if server.checkIdent {
_, serverPortString, err := net.SplitHostPort(conn.LocalAddr().String())
@@ -205,11 +208,6 @@ func (client *Client) Register() {
if client.registered {
return
}
if client.flags[TLS] {
// error is not useful to us here anyways, so we can ignore it
client.certfp, _ = client.socket.CertFP()
//TODO(dan): login based on certfp
}
client.registered = true
client.Touch()
}