Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( JWTSigningMethod string JWTSigningKey []byte )
JWT config values
Functions ¶
func CreateJWTToken ¶
func CreateJWTToken() *jwt.Token
CreateJWTToken return token based on config value. `security.auth_schemes.jwt_auth.signing_method` on security.conf
Types ¶
type AuthenticationProvider ¶
type AuthenticationProvider struct{}
AuthenticationProvider struct implements `authc.Authenticator` interface.
func (*AuthenticationProvider) GetAuthenticationInfo ¶
func (a *AuthenticationProvider) GetAuthenticationInfo(authcToken *authc.AuthenticationToken) (*authc.AuthenticationInfo, error)
GetAuthenticationInfo method is `authc.Authenticator` interface. It is called by Security Manager.
func (*AuthenticationProvider) Init ¶
func (a *AuthenticationProvider) Init(cfg *config.Config) error
Init method initializes the AuthenticationProvider, this method gets called during server start up.
type AuthorizationProvider ¶
type AuthorizationProvider struct{}
AuthorizationProvider struct implements `authz.Authorizer` interface.
func (*AuthorizationProvider) GetAuthorizationInfo ¶
func (a *AuthorizationProvider) GetAuthorizationInfo(authcInfo *authc.AuthenticationInfo) *authz.AuthorizationInfo
GetAuthorizationInfo method is `authz.Authorizer` interface.
GetAuthorizationInfo method gets called after authentication is successful to get Subject's (aka User) access control information such as roles and permissions. It is called by Security Manager.
func (*AuthorizationProvider) Init ¶
func (a *AuthorizationProvider) Init(cfg *config.Config) error
Init method initializes the AuthorizationProvider, this method gets called during server start up.