Documentation ¶
Index ¶
- type ServiceInterface
- func (_m *ServiceInterface) AuthClient(clientID uuid.UUID, secret string) (*model.Client, error)
- func (_m *ServiceInterface) AuthUser(username string, thePassword string) (*model.User, error)
- func (_m *ServiceInterface) Authenticate(token string) (*model.AccessToken, error)
- func (_m *ServiceInterface) ClientExists(clientID uuid.UUID) bool
- func (_m *ServiceInterface) CreateClient(clientID uuid.UUID, secret string, redirectURI string) (*model.Client, error)
- func (_m *ServiceInterface) CreateClientTx(tx *bun.DB, clientID uuid.UUID, secret string, redirectURI string) (*model.Client, error)
- func (_m *ServiceInterface) CreateUser(roleID int32, username string, password string) (*model.User, error)
- func (_m *ServiceInterface) CreateUserTx(tx *bun.DB, roleID int32, username string, password string) (*model.User, error)
- func (_m *ServiceInterface) FindClientByClientID(clientID uuid.UUID) (*model.Client, error)
- func (_m *ServiceInterface) FindUserByUsername(username string) (*model.User, error)
- func (_m *ServiceInterface) GetConfig() *config.Config
- func (_m *ServiceInterface) GetOrCreateRefreshToken(client *model.Client, user *model.User, expiresIn int, scope string) (*model.RefreshToken, error)
- func (_m *ServiceInterface) GetRoutes() []routes.Route
- func (_m *ServiceInterface) GetScope(requestedScope string) (string, error)
- func (_m *ServiceInterface) GetValidRefreshToken(token string, client *model.Client) (*model.RefreshToken, error)
- func (_m *ServiceInterface) GrantAccessToken(client *model.Client, user *model.User, expiresIn int, scope string) (*model.AccessToken, error)
- func (_m *ServiceInterface) GrantAuthorizationCode(client *model.Client, user *model.User, expiresIn int, redirectURI string, ...) (*model.AuthorizationCode, error)
- func (_m *ServiceInterface) IsRoleAllowed(role model.AccessRole) bool
- func (_m *ServiceInterface) Login(client *model.Client, user *model.User, scope string) (*model.AccessToken, *model.RefreshToken, error)
- func (_m *ServiceInterface) NewIntrospectResponseFromAccessToken(accessToken *model.AccessToken) (*oauth.IntrospectResponse, error)
- func (_m *ServiceInterface) NewIntrospectResponseFromRefreshToken(refreshToken *model.RefreshToken) (*oauth.IntrospectResponse, error)
- func (_m *ServiceInterface) RegisterRoutes(router *mux.Router, prefix string)
- func (_m *ServiceInterface) RestrictToRoles(allowedRoles ...int32)
- func (_m *ServiceInterface) SetPassword(user *model.User, password string) error
- func (_m *ServiceInterface) SetPasswordTx(tx *bun.DB, user *model.User, password string) error
- func (_m *ServiceInterface) UpdateUsername(user *model.User, username string) error
- func (_m *ServiceInterface) UpdateUsernameTx(db *bun.DB, user *model.User, username string) error
- func (_m *ServiceInterface) UserExists(username string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceInterface ¶
func (*ServiceInterface) AuthClient ¶
func (*ServiceInterface) Authenticate ¶
func (_m *ServiceInterface) Authenticate(token string) (*model.AccessToken, error)
func (*ServiceInterface) ClientExists ¶
func (_m *ServiceInterface) ClientExists(clientID uuid.UUID) bool
func (*ServiceInterface) CreateClient ¶
func (*ServiceInterface) CreateClientTx ¶
func (*ServiceInterface) CreateUser ¶
func (*ServiceInterface) CreateUserTx ¶
func (*ServiceInterface) FindClientByClientID ¶
func (*ServiceInterface) FindUserByUsername ¶
func (_m *ServiceInterface) FindUserByUsername(username string) (*model.User, error)
func (*ServiceInterface) GetConfig ¶
func (_m *ServiceInterface) GetConfig() *config.Config
func (*ServiceInterface) GetOrCreateRefreshToken ¶
func (_m *ServiceInterface) GetOrCreateRefreshToken(client *model.Client, user *model.User, expiresIn int, scope string) (*model.RefreshToken, error)
func (*ServiceInterface) GetRoutes ¶
func (_m *ServiceInterface) GetRoutes() []routes.Route
func (*ServiceInterface) GetScope ¶
func (_m *ServiceInterface) GetScope(requestedScope string) (string, error)
func (*ServiceInterface) GetValidRefreshToken ¶
func (_m *ServiceInterface) GetValidRefreshToken(token string, client *model.Client) (*model.RefreshToken, error)
func (*ServiceInterface) GrantAccessToken ¶
func (_m *ServiceInterface) GrantAccessToken(client *model.Client, user *model.User, expiresIn int, scope string) (*model.AccessToken, error)
func (*ServiceInterface) GrantAuthorizationCode ¶
func (*ServiceInterface) IsRoleAllowed ¶
func (_m *ServiceInterface) IsRoleAllowed(role model.AccessRole) bool
func (*ServiceInterface) Login ¶
func (_m *ServiceInterface) Login(client *model.Client, user *model.User, scope string) (*model.AccessToken, *model.RefreshToken, error)
func (*ServiceInterface) NewIntrospectResponseFromAccessToken ¶
func (_m *ServiceInterface) NewIntrospectResponseFromAccessToken(accessToken *model.AccessToken) (*oauth.IntrospectResponse, error)
func (*ServiceInterface) NewIntrospectResponseFromRefreshToken ¶
func (_m *ServiceInterface) NewIntrospectResponseFromRefreshToken(refreshToken *model.RefreshToken) (*oauth.IntrospectResponse, error)
func (*ServiceInterface) RegisterRoutes ¶
func (_m *ServiceInterface) RegisterRoutes(router *mux.Router, prefix string)
func (*ServiceInterface) RestrictToRoles ¶
func (_m *ServiceInterface) RestrictToRoles(allowedRoles ...int32)
func (*ServiceInterface) SetPassword ¶
func (_m *ServiceInterface) SetPassword(user *model.User, password string) error
func (*ServiceInterface) SetPasswordTx ¶
func (*ServiceInterface) UpdateUsername ¶
func (_m *ServiceInterface) UpdateUsername(user *model.User, username string) error
func (*ServiceInterface) UpdateUsernameTx ¶
func (*ServiceInterface) UserExists ¶
func (_m *ServiceInterface) UserExists(username string) bool
Click to show internal directories.
Click to hide internal directories.