summaryrefslogtreecommitdiff
path: root/pkg/vpn/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2020-02-11 13:43:01 +0100
committerkali kaneko (leap communications) <kali@leap.se>2020-08-20 20:27:42 +0200
commitc56df01274a91ff730018dcd6272423a3e1593f0 (patch)
tree0650d3b8cb27caff177b7306cc7f27d987824664 /pkg/vpn/main.go
parent8bb41cff9f47895e00d7773dfd9372a7e17fae59 (diff)
[feat] expose auth API in pkg/vpn
Be able to check if it needs auth and then be able to login. Use the logged in token for fetching the cert.
Diffstat (limited to 'pkg/vpn/main.go')
-rw-r--r--pkg/vpn/main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/vpn/main.go b/pkg/vpn/main.go
index 4bf4395..de8e61f 100644
--- a/pkg/vpn/main.go
+++ b/pkg/vpn/main.go
@@ -92,3 +92,11 @@ func (b *Bitmask) Close() {
func (b *Bitmask) Version() (string, error) {
return "", nil
}
+
+func (b *Bitmask) NeedsCredentials() bool {
+ return b.bonafide.NeedsCredentials()
+}
+
+func (b *Bitmask) DoLogin(username, password string) (bool, error) {
+ return b.bonafide.DoLogin(username, password)
+}