Documentation
¶
Index ¶
- func ConfigAccountOwnerRole() string
- func ConfigAnonymousAccount() string
- func ConfigAnonymousRole() string
- func ConfigAnonymousUser() string
- func ConfigLoggedInRole() string
- type AccountGetter
- type AccountGetterMock
- type AuthInfoGetter
- type AuthInfoGetterImpl
- type AuthInfoGetterMock
- type AuthzInfo
- type RoleGetter
- type RoleGetterMock
- type Service
- type ServiceMock
- type UserGetter
- type UserGetterMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigAccountOwnerRole ¶
func ConfigAccountOwnerRole() string
func ConfigAnonymousAccount ¶
func ConfigAnonymousAccount() string
func ConfigAnonymousRole ¶
func ConfigAnonymousRole() string
func ConfigAnonymousUser ¶
func ConfigAnonymousUser() string
func ConfigLoggedInRole ¶
func ConfigLoggedInRole() string
Types ¶
type AccountGetterMock ¶
type AccountGetterMock struct { AccountGetter mock.Mock }
func (*AccountGetterMock) GetAccount ¶
func (m *AccountGetterMock) GetAccount(r *http.Request) (string, error)
type AuthInfoGetter ¶
type AuthInfoGetterImpl ¶
type AuthInfoGetterImpl struct { UserGetter RoleGetter AccountGetter }
func (*AuthInfoGetterImpl) GetAuthInfo ¶
func (s *AuthInfoGetterImpl) GetAuthInfo(r *http.Request) (*AuthzInfo, error)
GetAuthInfo returns all the authentication information for a JWT token. It takes care of validating both token and membership of the user in the account (if provided)
type AuthInfoGetterMock ¶
func (*AuthInfoGetterMock) GetAuthInfo ¶
func (m *AuthInfoGetterMock) GetAuthInfo(r *http.Request) (*AuthzInfo, error)
func (*AuthInfoGetterMock) GetAuthInfoFromRequest ¶
func (m *AuthInfoGetterMock) GetAuthInfoFromRequest(r *http.Request) (*AuthzInfo, error)
type RoleGetterMock ¶
type RoleGetterMock struct { RoleGetter mock.Mock }
type Service ¶
type Service interface { RoleGetter UserGetter AccountGetter AuthInfoGetter }
func NewServiceMock ¶
func NewServiceMock() Service
type ServiceMock ¶
type ServiceMock struct { RoleGetterMock UserGetterMock AccountGetterMock AuthInfoGetterMock }
type UserGetterMock ¶
type UserGetterMock struct { UserGetter mock.Mock }
Click to show internal directories.
Click to hide internal directories.