Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type BaseResponse struct {
Status string `json:"status"`
Error string `json:"error"`
ErrorSource string `json:"errorSource"`
}
BaseResponse represents base response
type Config ¶
type Config struct {
Port string
IPLookupURL string
StaticRoutes []*StaticRoute
DsConfig *dsc.Config
}
Config represents sso config
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents http server
type Service ¶
type Service interface {
SignUp(*SignUpRequest, *http.Request) *SignUpResponse
SignIn(*SignInRequest) *SignInResponse
}
Service represents sso service
func NewService ¶
NewService creates a new SSO service.
type SignInRequest ¶
type SignInRequest struct {
Email string `json:"email"`
Password string `json:"password"`
RememberMe string `json:"rememberMe"`
LandingPage string `json:"landingPage"`
}
SignInRequest represents signin request
type SignInResponse ¶
type SignInResponse struct {
*BaseResponse
*User
LandingPage string `json:"landingPage"`
}
SignInResponse represents signin response
type SignUpRequest ¶
type SignUpRequest struct {
*User
DataOfBirth string `json:"dateOfBirth"`
Password string `json:"password"`
LandingPage string `json:"landingPage"`
}
SignUpRequest represents signup request
func (*SignUpRequest) Validate ¶
func (r *SignUpRequest) Validate() (string, error)
Validate check request all data if it is provided or valid.
type SignUpResponse ¶
type SignUpResponse struct {
*BaseResponse
*User
LandingPage string `json:"landingPage"`
}
SignUpResponse represents signup response
type StaticRoute ¶
StaticRoute represent a static route
Source Files
¶
Click to show internal directories.
Click to hide internal directories.