Note that there are some explanatory texts on larger screens.

plurals
  1. POAny way to view Secured Google App Engine endpoint in a browser (as a logged in user)
    primarykey
    data
    text
    <p>I'm very familiar with REST services and have just started with Google Endpoints.</p> <p>I have the following class:</p> <pre><code>@Api( name = "events", version = "v1" ) public class EventEndpoint { @ApiMethod( name = "events.get.all", path = "get", httpMethod = HttpMethod.GET ) // http://localhost:8888/_ah/api/events/v1/get public List&lt;Event&gt; getEvents() { return new EventDao().findAll(); } } </code></pre> <p>which returns the following json:</p> <pre><code>{ "items" : [ { "id" : "1", "version" : 1 }, { "id" : "2", "version" : 1 } ] } </code></pre> <p>Now - what I'm wondering is - if I change the Api method to include the following:</p> <pre><code>@Api( ... scopes = {"https://www.googleapis.com/auth/userinfo.email"} </code></pre> <p>and add a User object to my getEvents method, is there any way I can simply access it in the browser as a logged in Google User. Currently when I step through it with a debugger the User object is null. </p> <p>I'm not (obviously) super familiar with how this works - I plan to put an AngularJS front end on this, get a token like the link here: <a href="https://developers.google.com/appengine/docs/java/endpoints/consume_js#adding-oath-authentication" rel="nofollow">https://developers.google.com/appengine/docs/java/endpoints/consume_js#adding-oath-authentication</a>, but I'd like to at least be able to test my web services in the browser. Is this currently possible? This may be a simple question I'm just having problems finding out how to do it.</p> <p>Thank you</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload