Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTHelper ¶
type JWTHelper interface { Parse(token string, claims Claims) error CreateToken(claims Claims) (string, error) }
func NewFxJWTHelper ¶
func NewFxJWTHelper( provider application.Provider, ) (JWTHelper, error)
type RightsEnforcer ¶
type RightsEnforcerDescriptor ¶
type RightsEnforcerDescriptor struct { Name string RightsEnforcer RightsEnforcer }
type RightsEnforcerDescriptorOut ¶
type RightsEnforcerDescriptorOut struct { fx.Out Descriptor RightsEnforcerDescriptor `group:"rights_enforcer"` }
type RoleEnforcer ¶
type RoleEnforcer interface {
Enforce(session pbv1.Session, role pbv1.Role, permission pbv1.Permission) (bool, error)
}
func NewFxRoleEnforcer ¶
func NewFxRoleEnforcer( logger log.Logger, configProvider application.Provider, ) (RoleEnforcer, error)
type RoleEnforcerConfig ¶
type SessionClaims ¶
func (SessionClaims) Valid ¶
func (c SessionClaims) Valid() error
type SessionConfig ¶
type SessionManager ¶
type SessionManager interface { CreateTokenBySession(context.Context, pbv1.Session) (string, error) CreateToken(ctx context.Context, userUUID string, group pbv1.UserGroup) (string, error) GetSessionByToken(ctx context.Context, token string) (pbv1.Session, error) }
func NewFxSessionManager ¶
func NewFxSessionManager( provider application.Provider, logger log.Logger, jwtHelper JWTHelper, ) (SessionManager, error)
Click to show internal directories.
Click to hide internal directories.