Documentation ¶
Index ¶
- Variables
- type CertificateHash
- type Manager
- func (m *Manager) AuthorizeGeminiUser(r *gemini.Request) (UserInfo, error)
- func (m *Manager) AuthorizeWebDAVUser(r *http.Request) (bool, User, error)
- func (m *Manager) ChangePassword(user User) error
- func (m *Manager) Create(args NewArgs) (User, error)
- func (m *Manager) Delete(ch CertificateHash) error
- func (m *Manager) Get(ch CertificateHash) (User, bool, error)
- func (m *Manager) Set(user User) error
- func (m *Manager) Verify(user User, token string) error
- type NewArgs
- type User
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCertMismatch = errors.New("certificate mismatch")
View Source
var ErrInvalidToken = errors.New("invalid token")
View Source
var ErrNoUsername = errors.New("user has no username")
Functions ¶
This section is empty.
Types ¶
type CertificateHash ¶
type CertificateHash string
func HashCertificate ¶
func HashCertificate(cert *x509.Certificate) CertificateHash
type Manager ¶
type Manager struct { Store ez3.EZ3 TestMode bool // enables an alternate client cert parsing path }
func (*Manager) AuthorizeGeminiUser ¶
func (*Manager) AuthorizeWebDAVUser ¶
func (*Manager) ChangePassword ¶
func (*Manager) Delete ¶
func (m *Manager) Delete(ch CertificateHash) error
type NewArgs ¶
type NewArgs struct { CertificateHash Email string Username string }
type User ¶
type User struct { Created time.Time `json:"created"` CertificateHash CertificateHash `json:"certificate_hash"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` VerificationToken string `json:"verification_token"` Name string `json:"name"` WebDAVPassword string `json:"webdav_password"` }
func (*User) Deserialize ¶
Click to show internal directories.
Click to hide internal directories.