Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtProvider ¶
type JwtProvider struct { Username string `json:"username"` jwt.StandardClaims }
JwtProvider is the representation of decoded JWT
func CheckToken ¶
func CheckToken(security *SecurityAPI, w http.ResponseWriter, r *http.Request) (*JwtProvider, error)
CheckToken will return if token is valid or not
type SecurityAPI ¶
type SecurityAPI struct {
// contains filtered or unexported fields
}
SecurityAPI object contains informations related to the endpoints
func InitializeSecurity ¶
func InitializeSecurity(configuration configurationtypes.AbstractConfigurationInterface) *SecurityAPI
InitializeSecurity initialize the security endpoints
func (*SecurityAPI) GetBasePath ¶
func (s *SecurityAPI) GetBasePath() string
GetBasePath will return the basepath for this resource
func (*SecurityAPI) HandleRequest ¶
func (s *SecurityAPI) HandleRequest(w http.ResponseWriter, r *http.Request)
HandleRequest will handle the request
func (*SecurityAPI) IsEnabled ¶
func (s *SecurityAPI) IsEnabled() bool
IsEnabled will return enabled status
Click to show internal directories.
Click to hide internal directories.