Versions in this module Expand all Collapse all v1 v1.0.1 Nov 1, 2017 v1.0.0 Nov 1, 2017 Changes in this version + type ServiceInterface struct + 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