Documentation ¶
Overview ¶
This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
Index ¶
- func BasicAuthHandler(next http.Handler, authOptions *AuthOptions) http.Handler
- func ChangeAuthOptionsPass(authOptions *AuthOptions, pass string, salt string)
- func ChangeAuthOptionsUser(authOptions *AuthOptions, user string)
- func CreateCertificateIfNotExist(certFile string, keyFile string, commonName string, bits int)
- func ListenAndUpgradeTLS(addr string, certFile string, keyFile string, handler http.Handler) error
- func RandomString(len int) (string, error)
- func Sha512Sum(s string) string
- type AuthOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuthHandler ¶
func BasicAuthHandler(next http.Handler, authOptions *AuthOptions) http.Handler
func ChangeAuthOptionsPass ¶
func ChangeAuthOptionsPass(authOptions *AuthOptions, pass string, salt string)
func ChangeAuthOptionsUser ¶
func ChangeAuthOptionsUser(authOptions *AuthOptions, user string)
func ListenAndUpgradeTLS ¶
func RandomString ¶
Types ¶
type AuthOptions ¶
type AuthOptions struct {
// contains filtered or unexported fields
}
func NewAuthOptions ¶
func NewAuthOptions(user string, pass string, salt string) (authOptions *AuthOptions)
Click to show internal directories.
Click to hide internal directories.