Documentation ¶
Index ¶
- Variables
- type InitialState
- type Profile
- type Service
- func (s *Service) Close()
- func (s *Service) GetConfig() *config.Config
- func (s *Service) GetOauthService() oauth.ServiceInterface
- func (s *Service) GetRoutes() []routes.Route
- func (s *Service) GetSessionService() session.ServiceInterface
- func (s *Service) RegisterRoutes(router *mux.Router, prefix string)
- type ServiceInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSessionServiceNotPresent ... ErrSessionServiceNotPresent = errors.New("Session service not present in the request context") // ErrClientNotPresent ... ErrClientNotPresent = errors.New("Client not present in the request context") )
View Source
var ( ErrPasswordMismatch = errors.New("Password confirmation mismatch") ErrInvalidPassword = errors.New("Invalid password") )
View Source
var ( // ErrEmailInvalid ErrEmailInvalid = errors.New("Not a valid email") )
View Source
var ErrIncorrectResponseType = errors.New("Response type not one of token or code")
ErrIncorrectResponseType a form value for response_type was not set to token or code
View Source
var (
ErrTokenMissing = errors.New("Email confirmation token is missing")
)
Functions ¶
This section is empty.
Types ¶
type InitialState ¶ added in v1.0.5
type InitialState struct { ApplicationName string `json:"applicationName"` ClientID string `json:"clientID"` UserGroup string `json:"usergroup"` Token string `json:"token"` Clients []config.ClientConfig `json:"clients"` Profile *Profile `json:"profile"` }
func NewInitialState ¶ added in v1.0.5
func NewInitialState( cnf *config.Config, client *model.Client, user *model.User, userSession *session.UserSession, usergroup string, ) *InitialState
type Profile ¶ added in v1.0.5
type Profile struct { ID string `json:"id"` Email string `json:"email"` FullName string `json:"fullName"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Country string `json:"country"` EmailConfirmed bool `json:"emailConfirmed"` }
user public profile
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct keeps variables for reuse
func NewService ¶
func NewService(cnf *config.Config, oauthService oauth.ServiceInterface, sessionService session.ServiceInterface) *Service
NewService returns a new Service instance
func (*Service) GetOauthService ¶
func (s *Service) GetOauthService() oauth.ServiceInterface
GetOauthService returns oauth.Service instance
func (*Service) GetSessionService ¶
func (s *Service) GetSessionService() session.ServiceInterface
GetSessionService returns session.Service instance
type ServiceInterface ¶
type ServiceInterface interface { // Exported methods GetConfig() *config.Config GetOauthService() oauth.ServiceInterface GetSessionService() session.ServiceInterface GetRoutes() []routes.Route RegisterRoutes(router *mux.Router, prefix string) Close() // contains filtered or unexported methods }
ServiceInterface defines exported methods
Click to show internal directories.
Click to hide internal directories.