Are you saying that 'com.google.appengine.api.users.User' isn't working for
you? When I test it it authenticates only the Google Apps domain otherwise
the User object is null as expected.
On Monday, August 22, 2016 at 1:05:58 AM UTC-4, sugumar.p sugu wrote:
>
>
>
> As per your point on aug 10 we tried to create project ( As a Google Apps
> user and that you select your Google Apps organization on the project
> creation page ). But organization selection menu was not available in
> project creation page in console.
>
> We also tried domain admin account but we can't see any option to select
> for my organization.
>
> As per your suggested package (*com.google.appengine.api.users.User*)
> only used to authenticate google apps domain
> These are a full code
>
> import com.google.api.server.spi.config.Api;
> import com.google.api.server.spi.config.ApiMethod;
> import com.google.api.server.spi.config.ApiNamespace;
> import javax.inject.Named;
>
> import com.google.appengine.api.users.User;
> import static com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID;
>
> /**
> * An endpoint class we are exposing
> */
> @Api(
> name = "myApi",
> clientIds = {
> Constants.WEB_CLIENT_ID,
> Constants.ANDROID_CLIENT_ID,
> API_EXPLORER_CLIENT_ID},
> audiences = {Constants.ANDROID_AUDIENCE},
> scopes = {Constants.EMAIL_SCOPE},
> version = "v1",
> namespace = @ApiNamespace(
> ownerDomain = "backend.myapplication.p.sugumar.example.com
> ",
> ownerName = "backend.myapplication.p.sugumar.example.com",
> packagePath = ""
> )
> )
> public class MyEndpoint {
>
> /**
> * A simple endpoint method that takes a name and says Hi back
> */
> @ApiMethod(name = "sayHi")
> public MyBean sayHi(@Named("name") String name, User user) {
> MyBean response = new MyBean();
>
> if (user == null) {
> response.setData("Invalid Access..");
> return response;
>
> }
>
> response.setData("Hi, " + name + " Authentication Mail : " +
> user.getEmail());
> return response;
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/8394d635-75bd-400b-ab71-29790ba4c8bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.