Documentation
¶
Index ¶
- Variables
- func Decrypt(ciphertext []byte, key []byte) ([]byte, error)
- func DeriveKey(passphrase string, salt []byte) []byte
- func Encrypt(plaintext []byte, key []byte) ([]byte, error)
- func GenerateSalt() ([]byte, error)
- func HashPassphrase(passphrase string, salt []byte) string
- func IsAuthenticated(ctx context.Context) bool
- func VerifyPassphrase(passphrase string, salt []byte, storedHash string) bool
- type Service
- func (s *Service) CheckAuthentication(r *http.Request) bool
- func (s *Service) DecryptCredentials(ciphertext []byte) ([]byte, error)
- func (s *Service) EncryptCredentials(plaintext []byte) ([]byte, error)
- func (s *Service) IsConfigured() bool
- func (s *Service) Login(w http.ResponseWriter, r *http.Request, passphrase string) error
- func (s *Service) Logout(w http.ResponseWriter, r *http.Request)
- func (s *Service) Middleware(next http.Handler) http.Handler
- func (s *Service) OnCredentialsReady(callback func())
- func (s *Service) Setup(passphrase string) error
- func (s *Service) Validate(passphrase string) bool
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GenerateSalt ¶
func HashPassphrase ¶
func IsAuthenticated ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) DecryptCredentials ¶
func (*Service) EncryptCredentials ¶
func (*Service) IsConfigured ¶
func (*Service) OnCredentialsReady ¶
func (s *Service) OnCredentialsReady(callback func())
Click to show internal directories.
Click to hide internal directories.