Documentation
¶
Index ¶
- Variables
- func Base64Decode(base64Data string) (string, error)
- func Base64Encode(data string) string
- func EncryptPassword(password string) (string, error)
- func ExtractToken(r *http.Request) (string, error)
- func Hash(url string) string
- func LoadCATLSCredentials(cert_path string) (credentials.TransportCredentials, error)
- func LoadServerTLSCredentials(cert_path string) (credentials.TransportCredentials, error)
- func NewToken(userId string) (string, error)
- func ParseJwtCallback(token *jwt.Token) (interface{}, error)
- func ParseToken(tokenString string) (*jwt.Token, error)
- func VerifyPassword(hashed, password string) error
- type TokenPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBase64Decode = errors.New("invalid base64 data")
)
View Source
var (
ErrInvalidToken = errors.New("invalid token")
)
Functions ¶
func Base64Decode ¶
Base64Decode provides base64 decoding.
func EncryptPassword ¶
LoadServerTLSCredentials provides encrypt of password.
func ExtractToken ¶
ExtractToken provides extracting of token.
func LoadCATLSCredentials ¶
func LoadCATLSCredentials(cert_path string) (credentials.TransportCredentials, error)
LoadCATLSCredentials provides loading of cat tls credentials.
func LoadServerTLSCredentials ¶
func LoadServerTLSCredentials(cert_path string) (credentials.TransportCredentials, error)
LoadServerTLSCredentials provides loading of server tls credentials.
func ParseJwtCallback ¶
func ParseJwtCallback(token *jwt.Token) (interface{}, error)
ParseJwtCallback provides parsing of Jwt Callback.
func ParseToken ¶
ExtractToken provides parsing of token.
func VerifyPassword ¶
LoadServerTLSCredentials provides verify of password.
Types ¶
type TokenPayload ¶
TokenPayload provides the token payload instance.
func NewTokenPayload ¶
func NewTokenPayload(tokenString string) (*TokenPayload, error)
NewTokenPayload creates a new TokenPayload instance.
Click to show internal directories.
Click to hide internal directories.