Skip to content

A basic way to authenticate Google Cloud endpoints for apps using webapp2

Notifications You must be signed in to change notification settings

djvaldez/endpoints_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

endpoints_auth

A basic way to provide authentication/authorization for Google Cloud Endpoints apps using webapp2

Prerequisites

endpoints_auth was intended for Google Cloud Endpointsapps built using webapp2 as the authentication framework. This project lets your app authenticate Endpoints requests and reject requests not made by your application's users.

Usage

Use the auth_required function as a decorator for any of your Endpoints method like so:

import endpoints_auth

...

  @endpoints.method(RequestMessage, ResponseMessage, path='path/to/endpoint', http_method='POST', name='my_method_name')
  @endpoints_auth.auth_required()
  def foo(self, request):
      # Define function here

The client will need to make a request to your Endpoints API with the webapp2 user ID and token in the User-Id and Token headers, respectively.

About

A basic way to authenticate Google Cloud endpoints for apps using webapp2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages