Documentation
¶
Index ¶
- type Authorization
- func (a *Authorization) CreateResponseClient(authorizationRolesClient AuthorizationRolesClient, c HttpContext)
- func (a *Authorization) CreateResponsePassword(authorizationRoles AuthorizationRolesPassword, c HttpContext)
- func (a *Authorization) EchoHandler() echo.HandlerFunc
- func (a *Authorization) EchoRolesMiddleware(roleList ...RolesPermissions) echo.MiddlewareFunc
- func (a *Authorization) FiberHandler() fiber.Handler
- func (a *Authorization) FiberRolesMiddleware(roleList ...RolesPermissions) fiber.Handler
- func (a *Authorization) GenerateToken(authBasic AuthorizationRolesBasic, expiresAt time.Time) (*string, error)
- func (a *Authorization) GetEchoDefaultMiddleWareJwtValidate() echo.MiddlewareFunc
- func (a *Authorization) GetEchoMiddleWareJwtValidate(opt echojwt.Config) echo.MiddlewareFunc
- func (a *Authorization) GetFiberDefaultMiddleWareJwtValidate() fiber.Handler
- func (a *Authorization) LoginOAuth(c HttpContext) error
- type AuthorizationBasic
- type AuthorizationClientPass
- type AuthorizationRefreshPass
- type AuthorizationRolesBasic
- type AuthorizationRolesClient
- type AuthorizationRolesPassword
- type AuthorizationRolesRefresh
- type HttpContext
- type OAuthBasic
- type OAuthClient
- type OAuthConfigure
- type OAuthPassword
- type OAuthRefreshToken
- type OAuthSimpleOption
- type RequestCtx
- type RolesPermissions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct {
// contains filtered or unexported fields
}
func NewAuthorization ¶
func NewAuthorization(c *OAuthConfigure, s *OAuthSimpleOption) *Authorization
func (*Authorization) CreateResponseClient ¶
func (a *Authorization) CreateResponseClient(authorizationRolesClient AuthorizationRolesClient, c HttpContext)
func (*Authorization) CreateResponsePassword ¶
func (a *Authorization) CreateResponsePassword(authorizationRoles AuthorizationRolesPassword, c HttpContext)
func (*Authorization) EchoHandler ¶ added in v1.1.10
func (a *Authorization) EchoHandler() echo.HandlerFunc
func (*Authorization) EchoRolesMiddleware ¶ added in v1.1.10
func (a *Authorization) EchoRolesMiddleware(roleList ...RolesPermissions) echo.MiddlewareFunc
func (*Authorization) FiberHandler ¶ added in v1.1.10
func (a *Authorization) FiberHandler() fiber.Handler
func (*Authorization) FiberRolesMiddleware ¶ added in v1.1.10
func (a *Authorization) FiberRolesMiddleware(roleList ...RolesPermissions) fiber.Handler
func (*Authorization) GenerateToken ¶
func (a *Authorization) GenerateToken(authBasic AuthorizationRolesBasic, expiresAt time.Time) (*string, error)
func (*Authorization) GetEchoDefaultMiddleWareJwtValidate ¶ added in v1.1.10
func (a *Authorization) GetEchoDefaultMiddleWareJwtValidate() echo.MiddlewareFunc
func (*Authorization) GetEchoMiddleWareJwtValidate ¶ added in v1.1.10
func (a *Authorization) GetEchoMiddleWareJwtValidate(opt echojwt.Config) echo.MiddlewareFunc
func (*Authorization) GetFiberDefaultMiddleWareJwtValidate ¶ added in v1.1.10
func (a *Authorization) GetFiberDefaultMiddleWareJwtValidate() fiber.Handler
func (*Authorization) LoginOAuth ¶
func (a *Authorization) LoginOAuth(c HttpContext) error
type AuthorizationBasic ¶
type AuthorizationClientPass ¶
type AuthorizationClientPass struct {
AuthorizationBasic
}
type AuthorizationRefreshPass ¶
type AuthorizationRefreshPass struct {
AuthorizationBasic
Refresh_token string `json:"refresh_token"`
}
type AuthorizationRolesBasic ¶
type AuthorizationRolesClient ¶
type AuthorizationRolesClient struct {
AuthorizationRolesBasic
}
type AuthorizationRolesPassword ¶
type AuthorizationRolesPassword struct {
AuthorizationRolesBasic
RefreshToken string `json:"refresh_token"`
}
type AuthorizationRolesRefresh ¶
type AuthorizationRolesRefresh struct {
AuthorizationRolesPassword
}
type HttpContext ¶ added in v1.1.10
type OAuthBasic ¶
type OAuthClient ¶
type OAuthClient struct {
OAuthBasic
}
type OAuthConfigure ¶
type OAuthConfigure struct {
PasswordAuthorization func(ctx RequestCtx, pass *OAuthPassword) AuthorizationRolesPassword
ClientCredentialsAuthorization func(ctx RequestCtx, client *OAuthClient) AuthorizationRolesClient
RefreshTokenCredentialsAuthorization func(ctx RequestCtx, refresh *OAuthRefreshToken) AuthorizationRolesRefresh
CustomActionRolesMiddleware func(ctx RequestCtx, token *jwt.Token, claims jwt.MapClaims) error
}
type OAuthPassword ¶
type OAuthPassword struct {
OAuthBasic
Username string `json:"username"`
Password string `json:"password"`
}
type OAuthRefreshToken ¶
type OAuthRefreshToken struct {
OAuthBasic
Refresh_token string `json:"refresh_token"`
}
type OAuthSimpleOption ¶
type RequestCtx ¶ added in v1.1.11
type RequestCtx = HttpContext
type RolesPermissions ¶ added in v1.1.5
type RolesPermissions string
Click to show internal directories.
Click to hide internal directories.