Documentation ¶
Overview ¶
Package rest implement the callback required by the oauth2 package
Package rest implement the callback required by the oauth2 package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(server *osin.Server, service ServiceInterface) *rest
New return a new rest instance
Types ¶
type RequestDTOUserCredentials ¶
type RequestDTOUserCredentials struct { Method string `json:"method"` Username string `json:"username"` Password string `json:"password"` }
RequestDTOUserCredentials is the object to map JSON request body of a login request
type ResponseDTOUserInfo ¶
ResponseDTOUserInfo is the object to map JSON response body of a request to get user basic info
type ServiceInterface ¶
type ServiceInterface interface { AskUserServiceToCheckCredentials(username string, password string, method string) (ResponseDTOUserInfo, *apihelper.ApiErrors) GetResourceOwnerId(token string) (ResponseDTOUserInfo, *servicehelper.Error) }
ServiceInterface is the model for the service package of oauth2
Click to show internal directories.
Click to hide internal directories.