Documentation ¶
Index ¶
- type SecurityContext
- func (s *SecurityContext) Can(_ context.Context, _ types.Action, _ types.Resource) bool
- func (s *SecurityContext) GetUsername() string
- func (s *SecurityContext) IsAuthenticated() bool
- func (s *SecurityContext) IsSolutionUser() bool
- func (s *SecurityContext) IsSysAdmin() bool
- func (s *SecurityContext) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecurityContext ¶
type SecurityContext struct {
// contains filtered or unexported fields
}
SecurityContext implements security.Context interface based on secret store
func NewSecurityContext ¶
func NewSecurityContext(secret string, store *secret.Store) *SecurityContext
NewSecurityContext ...
func (*SecurityContext) Can ¶
Can returns whether the user can do action on resource returns true if the corresponding user of the secret is jobservice or core service, otherwise returns false
func (*SecurityContext) GetUsername ¶
func (s *SecurityContext) GetUsername() string
GetUsername returns the corresponding username of the secret or null if the secret is invalid
func (*SecurityContext) IsAuthenticated ¶
func (s *SecurityContext) IsAuthenticated() bool
IsAuthenticated returns true if the secret is valid
func (*SecurityContext) IsSolutionUser ¶
func (s *SecurityContext) IsSolutionUser() bool
IsSolutionUser ...
func (*SecurityContext) IsSysAdmin ¶
func (s *SecurityContext) IsSysAdmin() bool
IsSysAdmin always returns false
func (*SecurityContext) Name ¶
func (s *SecurityContext) Name() string
Name returns the name of the security context
Click to show internal directories.
Click to hide internal directories.