Documentation
¶
Index ¶
- type AuthService1
- type AuthService2
- type AuthenticatorManagerImpl
- type AuthorizerManagerImpl
- type DefaultRandomService
- func (inst *DefaultRandomService) NextBytes(length int) []byte
- func (inst *DefaultRandomService) NextInt() int
- func (inst *DefaultRandomService) NextInt64() int64
- func (inst *DefaultRandomService) NextString(length int) string
- func (inst *DefaultRandomService) Reader() io.Reader
- func (inst *DefaultRandomService) Source() random.Source
- type DefaultRandomSource
- type DefaultSubjectLoader
- type JWTCODEC
- type JWTService
- func (inst *JWTService) Decode(t jwt.Text) (*jwt.Token, error)
- func (inst *JWTService) Encode(o *jwt.Token) (jwt.Text, error)
- func (inst *JWTService) GetDTO(c context.Context) (*jwt.Token, error)
- func (inst *JWTService) GetText(c context.Context) (jwt.Text, error)
- func (inst *JWTService) SetDTO(c context.Context, o *jwt.Token) error
- func (inst *JWTService) SetText(c context.Context, t jwt.Text) error
- type RbacSessionServiceImpl
- func (inst *RbacSessionServiceImpl) Find(c context.Context, id rbac.SessionID) (*rbac.SessionDTO, error)
- func (inst *RbacSessionServiceImpl) Insert(c context.Context, item *rbac.SessionDTO) (*rbac.SessionDTO, error)
- func (inst *RbacSessionServiceImpl) Update(c context.Context, id rbac.SessionID, src *rbac.SessionDTO) (*rbac.SessionDTO, error)
- type RbacSubjectServiceImpl
- type RbacTokenServiceImpl
- type SessionServiceImpl
- type UUIDServiceImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService1 ¶
type AuthService1 struct { Authenticators auth.AuthenticatorManager //starter:inject("#") Authorizers auth.AuthorizerManager //starter:inject("#") LogBadAuthError bool //starter:inject("${security.log-bad-auth-error}") // contains filtered or unexported fields }
AuthService1 ... 是面向 a&a 的 auth 服务
func (*AuthService1) Authenticate ¶
func (inst *AuthService1) Authenticate(a auth.Authentication) ([]auth.Identity, error)
Authenticate 验证
func (*AuthService1) Authorize ¶
func (inst *AuthService1) Authorize(a auth.Authorization) error
Authorize 授权
type AuthService2 ¶
type AuthService2 struct { Servic1 auth.Service //starter:inject("#") // contains filtered or unexported fields }
AuthService2 是面向 rabc 的 auth 服务
type AuthenticatorManagerImpl ¶ added in v1.0.22
type AuthenticatorManagerImpl struct { RegistryList []auth.Registry //starter:inject(".") // contains filtered or unexported fields }
AuthenticatorManagerImpl ...
func (*AuthenticatorManagerImpl) FindFor ¶ added in v1.0.22
func (inst *AuthenticatorManagerImpl) FindFor(a auth.Authentication) (auth.Authenticator, error)
FindFor ...
func (*AuthenticatorManagerImpl) ListFor ¶ added in v1.0.23
func (inst *AuthenticatorManagerImpl) ListFor(a auth.Authentication) []auth.Authenticator
ListFor ...
type AuthorizerManagerImpl ¶ added in v1.0.22
type AuthorizerManagerImpl struct { RegistryList []auth.Registry //starter:inject(".") // contains filtered or unexported fields }
AuthorizerManagerImpl ...
func (*AuthorizerManagerImpl) FindFor ¶ added in v1.0.22
func (inst *AuthorizerManagerImpl) FindFor(a auth.Authorization) (auth.Authorizer, error)
FindFor ...
func (*AuthorizerManagerImpl) ListFor ¶ added in v1.0.23
func (inst *AuthorizerManagerImpl) ListFor(a auth.Authorization) []auth.Authorizer
ListFor ...
type DefaultRandomService ¶ added in v1.0.9
type DefaultRandomService struct { Providers []random.ProviderRegistry //starter:inject(".") // contains filtered or unexported fields }
DefaultRandomService ... 随机数服务
func (*DefaultRandomService) NextBytes ¶ added in v1.0.9
func (inst *DefaultRandomService) NextBytes(length int) []byte
NextBytes ...
func (*DefaultRandomService) NextInt ¶ added in v1.0.9
func (inst *DefaultRandomService) NextInt() int
NextInt ...
func (*DefaultRandomService) NextInt64 ¶ added in v1.0.9
func (inst *DefaultRandomService) NextInt64() int64
NextInt64 ...
func (*DefaultRandomService) NextString ¶ added in v1.0.9
func (inst *DefaultRandomService) NextString(length int) string
NextString ...
func (*DefaultRandomService) Reader ¶ added in v1.0.9
func (inst *DefaultRandomService) Reader() io.Reader
Reader ...
func (*DefaultRandomService) Source ¶ added in v1.0.9
func (inst *DefaultRandomService) Source() random.Source
Source ...
type DefaultRandomSource ¶ added in v1.0.9
type DefaultRandomSource struct {
// contains filtered or unexported fields
}
DefaultRandomSource ... 默认随机源
func (*DefaultRandomSource) Read ¶ added in v1.0.9
func (inst *DefaultRandomSource) Read(p []byte) (n int, err error)
func (*DefaultRandomSource) Reader ¶ added in v1.0.9
func (inst *DefaultRandomSource) Reader() io.Reader
Reader ...
func (*DefaultRandomSource) Registration ¶ added in v1.0.9
func (inst *DefaultRandomSource) Registration() *random.ProviderRegistration
Registration ...
func (*DefaultRandomSource) Source ¶ added in v1.0.9
func (inst *DefaultRandomSource) Source() random.Source
Source ...
type DefaultSubjectLoader ¶ added in v1.0.49
type DefaultSubjectLoader struct { Sessions rbac.SessionService //starter:inject("#") Tokens rbac.TokenService //starter:inject("#") // contains filtered or unexported fields }
DefaultSubjectLoader ...
type JWTCODEC ¶ added in v1.0.28
type JWTCODEC struct {
// contains filtered or unexported fields
}
JWTCODEC ... 实现 JWT 的编解码
func (*JWTCODEC) ListRegistrations ¶ added in v1.0.28
func (inst *JWTCODEC) ListRegistrations() []*jwt.Registration
ListRegistrations ...
type JWTService ¶
type JWTService struct { RegistryList []jwt.Registry //starter:inject(".") TokenMaxageDefault int //starter:inject("${security.jwt.default-age-sec}") TokenMaxageMin int //starter:inject("${security.jwt.min-age-sec}") TokenMaxageMax int //starter:inject("${security.jwt.max-age-sec}") SessionMaxageDefault int //starter:inject("${security.session.default-age-sec}") SessionMaxageMin int //starter:inject("${security.session.min-age-sec}") SessionMaxageMax int //starter:inject("${security.session.max-age-sec}") // contains filtered or unexported fields }
JWTService 实现 jwt.Service
type RbacSessionServiceImpl ¶ added in v1.0.49
type RbacSessionServiceImpl struct { KVS keyvalues.Service //starter:inject("#") UUIDGen random.UUIDService //starter:inject("#") MaxAge int64 //starter:inject("${security.session.default-age-sec}") // contains filtered or unexported fields }
RbacSessionServiceImpl ...
func (*RbacSessionServiceImpl) Find ¶ added in v1.0.49
func (inst *RbacSessionServiceImpl) Find(c context.Context, id rbac.SessionID) (*rbac.SessionDTO, error)
Find ...
func (*RbacSessionServiceImpl) Insert ¶ added in v1.0.49
func (inst *RbacSessionServiceImpl) Insert(c context.Context, item *rbac.SessionDTO) (*rbac.SessionDTO, error)
Insert ...
func (*RbacSessionServiceImpl) Update ¶ added in v1.0.49
func (inst *RbacSessionServiceImpl) Update(c context.Context, id rbac.SessionID, src *rbac.SessionDTO) (*rbac.SessionDTO, error)
Update ...
type RbacSubjectServiceImpl ¶ added in v1.0.49
type RbacSubjectServiceImpl struct { Tokens rbac.TokenService //starter:inject("#") Sessions rbac.SessionService //starter:inject("#") // contains filtered or unexported fields }
RbacSubjectServiceImpl ...
func (*RbacSubjectServiceImpl) GetCurrent ¶ added in v1.0.49
func (inst *RbacSubjectServiceImpl) GetCurrent(c context.Context) (*rbac.SubjectDTO, error)
GetCurrent ...
type RbacTokenServiceImpl ¶ added in v1.0.49
type RbacTokenServiceImpl struct { JWTService jwt.Service //starter:inject("#") // contains filtered or unexported fields }
RbacTokenServiceImpl ... 通过 jwt 实现 rbac.TokenService 的功能
func (*RbacTokenServiceImpl) GetCurrent ¶ added in v1.0.49
GetCurrent ...
func (*RbacTokenServiceImpl) PutCurrent ¶ added in v1.0.49
func (inst *RbacTokenServiceImpl) PutCurrent(c context.Context, token *rbac.TokenDTO) (*rbac.TokenDTO, error)
PutCurrent ...
type SessionServiceImpl ¶ added in v1.0.14
type SessionServiceImpl struct { RegistryList []security.SessionRegistry //starter:inject(".") // contains filtered or unexported fields }
SessionServiceImpl ...
func (*SessionServiceImpl) GetCurrent ¶ added in v1.0.14
GetCurrent ...
type UUIDServiceImpl ¶ added in v1.0.21
type UUIDServiceImpl struct { Host string //starter:inject("${security.uuid.service.hostname}") // contains filtered or unexported fields }
UUIDServiceImpl 实现 UUID 创建服务
func (*UUIDServiceImpl) Build ¶ added in v1.0.21
func (inst *UUIDServiceImpl) Build() random.UUIDBuilder
Build ...
func (*UUIDServiceImpl) Life ¶ added in v1.0.21
func (inst *UUIDServiceImpl) Life() *application.Life
Life ...
Source Files
¶
- auth_aa_service.go
- auth_reg_sorter.go
- auth_with_rbac_service.go
- authenticator_manager.go
- authorizer_manager.go
- data_entities.go
- default_random_service.go
- default_random_source.go
- jwt_codec.go
- jwt_service.go
- max_age_computer.go
- rbac_session_service.go
- rbac_subject_service.go
- rbac_token_service.go
- session_service_impl.go
- subject_impl.go
- subject_loader.go
- uuid_service.go