summaryrefslogtreecommitdiff
path: root/pkg/vpn/bonafide/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vpn/bonafide/auth.go')
-rw-r--r--pkg/vpn/bonafide/auth.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/vpn/bonafide/auth.go b/pkg/vpn/bonafide/auth.go
index b6b3eec..62d3d8f 100644
--- a/pkg/vpn/bonafide/auth.go
+++ b/pkg/vpn/bonafide/auth.go
@@ -15,7 +15,16 @@
package bonafide
-type Credentials struct {
+type credentials struct {
User string
Password string
}
+
+// The authentication interface allows to get a Certificate in Pem format.
+// We implement Anonymous Authentication (Riseup et al), and Sip (Libraries).
+
+type authentication interface {
+ needsCredentials() bool
+ getToken(cred *credentials) ([]byte, error)
+ getPemCertificate(cred *credentials) ([]byte, error)
+}