Documentation ¶
Index ¶
- type ServiceInterface
- func (_m *ServiceInterface) AuthClient(clientID string, secret string) (*models.OauthClient, error)
- func (_m *ServiceInterface) AuthUser(username string, thePassword string) (*models.OauthUser, error)
- func (_m *ServiceInterface) Authenticate(token string) (*models.OauthAccessToken, error)
- func (_m *ServiceInterface) ClientExists(clientID string) bool
- func (_m *ServiceInterface) CreateClient(clientID string, secret string, redirectURI string) (*models.OauthClient, error)
- func (_m *ServiceInterface) CreateClientTx(tx *gorm.DB, clientID string, secret string, redirectURI string) (*models.OauthClient, error)
- func (_m *ServiceInterface) CreateUser(roleID string, username string, password string) (*models.OauthUser, error)
- func (_m *ServiceInterface) CreateUserTx(tx *gorm.DB, roleID string, username string, password string) (*models.OauthUser, error)
- func (_m *ServiceInterface) FindClientByClientID(clientID string) (*models.OauthClient, error)
- func (_m *ServiceInterface) FindUserByUsername(username string) (*models.OauthUser, error)
- func (_m *ServiceInterface) GetConfig() *config.Config
- func (_m *ServiceInterface) GetOrCreateRefreshToken(client *models.OauthClient, user *models.OauthUser, expiresIn int, ...) (*models.OauthRefreshToken, error)
- func (_m *ServiceInterface) GetRoutes() []routes.Route
- func (_m *ServiceInterface) GetScope(requestedScope string) (string, error)
- func (_m *ServiceInterface) GetValidRefreshToken(token string, client *models.OauthClient) (*models.OauthRefreshToken, error)
- func (_m *ServiceInterface) GrantAccessToken(client *models.OauthClient, user *models.OauthUser, expiresIn int, ...) (*models.OauthAccessToken, error)
- func (_m *ServiceInterface) GrantAuthorizationCode(client *models.OauthClient, user *models.OauthUser, expiresIn int, ...) (*models.OauthAuthorizationCode, error)
- func (_m *ServiceInterface) IsRoleAllowed(role string) bool
- func (_m *ServiceInterface) Login(client *models.OauthClient, user *models.OauthUser, scope string) (*models.OauthAccessToken, *models.OauthRefreshToken, error)
- func (_m *ServiceInterface) NewIntrospectResponseFromAccessToken(accessToken *models.OauthAccessToken) (*oauth.IntrospectResponse, error)
- func (_m *ServiceInterface) NewIntrospectResponseFromRefreshToken(refreshToken *models.OauthRefreshToken) (*oauth.IntrospectResponse, error)
- func (_m *ServiceInterface) RegisterRoutes(router *mux.Router, prefix string)
- func (_m *ServiceInterface) RestrictToRoles(allowedRoles ...string)
- func (_m *ServiceInterface) SetPassword(user *models.OauthUser, password string) error
- func (_m *ServiceInterface) SetPasswordTx(tx *gorm.DB, user *models.OauthUser, password string) error
- func (_m *ServiceInterface) UpdateUsername(user *models.OauthUser, username string) error
- func (_m *ServiceInterface) UpdateUsernameTx(db *gorm.DB, user *models.OauthUser, 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 (_m *ServiceInterface) AuthClient(clientID string, secret string) (*models.OauthClient, error)
func (*ServiceInterface) Authenticate ¶
func (_m *ServiceInterface) Authenticate(token string) (*models.OauthAccessToken, error)
func (*ServiceInterface) ClientExists ¶
func (_m *ServiceInterface) ClientExists(clientID string) bool
func (*ServiceInterface) CreateClient ¶
func (_m *ServiceInterface) CreateClient(clientID string, secret string, redirectURI string) (*models.OauthClient, error)
func (*ServiceInterface) CreateClientTx ¶
func (_m *ServiceInterface) CreateClientTx(tx *gorm.DB, clientID string, secret string, redirectURI string) (*models.OauthClient, error)
func (*ServiceInterface) CreateUser ¶
func (*ServiceInterface) CreateUserTx ¶
func (*ServiceInterface) FindClientByClientID ¶
func (_m *ServiceInterface) FindClientByClientID(clientID string) (*models.OauthClient, error)
func (*ServiceInterface) FindUserByUsername ¶
func (_m *ServiceInterface) FindUserByUsername(username string) (*models.OauthUser, error)
func (*ServiceInterface) GetConfig ¶
func (_m *ServiceInterface) GetConfig() *config.Config
func (*ServiceInterface) GetOrCreateRefreshToken ¶
func (_m *ServiceInterface) GetOrCreateRefreshToken(client *models.OauthClient, user *models.OauthUser, expiresIn int, scope string) (*models.OauthRefreshToken, 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 *models.OauthClient) (*models.OauthRefreshToken, error)
func (*ServiceInterface) GrantAccessToken ¶
func (_m *ServiceInterface) GrantAccessToken(client *models.OauthClient, user *models.OauthUser, expiresIn int, scope string) (*models.OauthAccessToken, error)
func (*ServiceInterface) GrantAuthorizationCode ¶
func (_m *ServiceInterface) GrantAuthorizationCode(client *models.OauthClient, user *models.OauthUser, expiresIn int, redirectURI string, scope string) (*models.OauthAuthorizationCode, error)
func (*ServiceInterface) IsRoleAllowed ¶
func (_m *ServiceInterface) IsRoleAllowed(role string) bool
func (*ServiceInterface) Login ¶
func (_m *ServiceInterface) Login(client *models.OauthClient, user *models.OauthUser, scope string) (*models.OauthAccessToken, *models.OauthRefreshToken, error)
func (*ServiceInterface) NewIntrospectResponseFromAccessToken ¶
func (_m *ServiceInterface) NewIntrospectResponseFromAccessToken(accessToken *models.OauthAccessToken) (*oauth.IntrospectResponse, error)
func (*ServiceInterface) NewIntrospectResponseFromRefreshToken ¶
func (_m *ServiceInterface) NewIntrospectResponseFromRefreshToken(refreshToken *models.OauthRefreshToken) (*oauth.IntrospectResponse, error)
func (*ServiceInterface) RegisterRoutes ¶
func (_m *ServiceInterface) RegisterRoutes(router *mux.Router, prefix string)
func (*ServiceInterface) RestrictToRoles ¶
func (_m *ServiceInterface) RestrictToRoles(allowedRoles ...string)
func (*ServiceInterface) SetPassword ¶
func (_m *ServiceInterface) SetPassword(user *models.OauthUser, password string) error
func (*ServiceInterface) SetPasswordTx ¶
func (*ServiceInterface) UpdateUsername ¶
func (_m *ServiceInterface) UpdateUsername(user *models.OauthUser, 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.