mocks

package
v0.0.0-...-318ef2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2016 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceInterface

type ServiceInterface struct {
	mock.Mock
}

func (*ServiceInterface) AuthClient

func (_m *ServiceInterface) AuthClient(clientID string, secret string) (*oauth.Client, error)

func (*ServiceInterface) AuthUser

func (_m *ServiceInterface) AuthUser(username string, thePassword string) (*oauth.User, error)

func (*ServiceInterface) Authenticate

func (_m *ServiceInterface) Authenticate(token string) (*oauth.AccessToken, error)

func (*ServiceInterface) ClientExists

func (_m *ServiceInterface) ClientExists(clientID string) bool

func (*ServiceInterface) CreateClient

func (_m *ServiceInterface) CreateClient(clientID string, secret string, redirectURI string) (*oauth.Client, error)

func (*ServiceInterface) CreateClientTx

func (_m *ServiceInterface) CreateClientTx(tx *gorm.DB, clientID string, secret string, redirectURI string) (*oauth.Client, error)

func (*ServiceInterface) CreateUser

func (_m *ServiceInterface) CreateUser(roleID string, username string, password string) (*oauth.User, error)

func (*ServiceInterface) CreateUserTx

func (_m *ServiceInterface) CreateUserTx(tx *gorm.DB, roleID string, username string, password string) (*oauth.User, error)

func (*ServiceInterface) FindClientByClientID

func (_m *ServiceInterface) FindClientByClientID(clientID string) (*oauth.Client, error)

func (*ServiceInterface) FindUserByUsername

func (_m *ServiceInterface) FindUserByUsername(username string) (*oauth.User, error)

func (*ServiceInterface) GetConfig

func (_m *ServiceInterface) GetConfig() *config.Config

func (*ServiceInterface) GetOrCreateRefreshToken

func (_m *ServiceInterface) GetOrCreateRefreshToken(client *oauth.Client, user *oauth.User, expiresIn int, scope string) (*oauth.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 *oauth.Client) (*oauth.RefreshToken, error)

func (*ServiceInterface) GrantAccessToken

func (_m *ServiceInterface) GrantAccessToken(client *oauth.Client, user *oauth.User, expiresIn int, scope string) (*oauth.AccessToken, error)

func (*ServiceInterface) GrantAuthorizationCode

func (_m *ServiceInterface) GrantAuthorizationCode(client *oauth.Client, user *oauth.User, expiresIn int, redirectURI string, scope string) (*oauth.AuthorizationCode, error)

func (*ServiceInterface) IsRoleAllowed

func (_m *ServiceInterface) IsRoleAllowed(role string) bool

func (*ServiceInterface) Login

func (_m *ServiceInterface) Login(client *oauth.Client, user *oauth.User, scope string) (*oauth.AccessToken, *oauth.RefreshToken, error)

func (*ServiceInterface) NewIntrospectResponseFromAccessToken

func (_m *ServiceInterface) NewIntrospectResponseFromAccessToken(accessToken *oauth.AccessToken) (*oauth.IntrospectResponse, error)

func (*ServiceInterface) NewIntrospectResponseFromRefreshToken

func (_m *ServiceInterface) NewIntrospectResponseFromRefreshToken(refreshToken *oauth.RefreshToken) (*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 *oauth.User, password string) error

func (*ServiceInterface) SetPasswordTx

func (_m *ServiceInterface) SetPasswordTx(tx *gorm.DB, user *oauth.User, password string) error

func (*ServiceInterface) UpdateUsername

func (_m *ServiceInterface) UpdateUsername(user *oauth.User, username string) error

func (*ServiceInterface) UpdateUsernameTx

func (_m *ServiceInterface) UpdateUsernameTx(db *gorm.DB, user *oauth.User, username string) error

func (*ServiceInterface) UserExists

func (_m *ServiceInterface) UserExists(username string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL