Documentation
¶
Index ¶
- func AuthorizeAccessToResource(resource api.ResourceType) gin.HandlerFunc
- func ExtractAppVersion() gin.HandlerFunc
- func ExtractAuthorizationToken(req *http.Request, method string) (token string, err error)
- func ExtractDeviceID() gin.HandlerFunc
- func ExtractDeviceInfo() gin.HandlerFunc
- func ExtractLanguage() gin.HandlerFunc
- func ExtractPlatform() gin.HandlerFunc
- func RequireAccessToken(realm string, authServiceURL string, authClient string) gin.HandlerFunc
- func RequireBasicAuthorization(realm string, mandatory bool) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeAccessToResource ¶
func AuthorizeAccessToResource(resource api.ResourceType) gin.HandlerFunc
AuthorizeAccessToResource is in charge of checking if the requested resource can be accesed by the sent token
For example: Let's say you want to get the lists for a Venue ID 12345 and you have a valid token generated for your (user ID 9988); so you send a request to something like GET->/venue/12345/lists.
If you are not the owner of the venue, system should return a
func ExtractAppVersion ¶
func ExtractAppVersion() gin.HandlerFunc
ExtractAppVersion is the handler used to retrieve the application version from HTTP header
func ExtractAuthorizationToken ¶
ExtractAuthorizationToken parses the token from the 'Authorization' header
func ExtractDeviceID ¶
func ExtractDeviceID() gin.HandlerFunc
ExtractDeviceID is the handler used to retrieve the device id
func ExtractDeviceInfo ¶
func ExtractDeviceInfo() gin.HandlerFunc
ExtractDeviceInfo is the handler used to retrieve the device info
func ExtractLanguage ¶
func ExtractLanguage() gin.HandlerFunc
ExtractLanguage is the handler used to retrieve language header
func ExtractPlatform ¶
func ExtractPlatform() gin.HandlerFunc
ExtractPlatform is the handler used to retrieve the device platoform from HTTP header
func RequireAccessToken ¶
func RequireAccessToken(realm string, authServiceURL string, authClient string) gin.HandlerFunc
RequireAccessToken is the function used to handle all the request that requires a token as part of the request.
func RequireBasicAuthorization ¶
func RequireBasicAuthorization(realm string, mandatory bool) gin.HandlerFunc
RequireBasicAuthorization is the funcion used to require Basic authentication header in a request
Types ¶
This section is empty.