Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← User Authentication - Developing Scalable Apps with Java

Get Embed Code
6 Languages

Showing Revision 5 created 05/25/2016 by Udacity Robot.

  1. Congratulations, you just did a lot of stuff. Let's do
  2. a recap. You've wrote your first lines of code and
  3. deployed it to App Engine. You got Conference Central up
  4. and running. And you've tried out the API Explorer. Don't underestimate
  5. the API Explorer. It's a great tool to use to
  6. try out the APIs. And it's not limited to your
  7. own APIs, you can use it for any Google API.
  8. So, all good stuff. But let's now talk about user authentication.
  9. Many applications require that a user is registered and
  10. signed in before using the application. We will also require
  11. this for Conference Central, so let's look at how
  12. we do that. It used to be the case that
  13. almost every application had to create their own user
  14. management system. That would mean that you would have to
  15. write all the code from scratch in order for
  16. your users to use your applications. Well, good for us.
  17. That is not needed anymore. With App Engine, you
  18. can use third party authentication with Cloud Endpoints, such
  19. as Google Plus sign-in. But also other ones can
  20. be used. In Conference Central, we will require a Google
  21. account for sign-in. So, how do we know that
  22. the user is signed into their Google account when they
  23. use Conference Central? That is actually taking care of
  24. by Cloud Endpoints. A Cloud Endpoint's API method can optionally
  25. take a user object as its first argument and
  26. if the user object is not null then the
  27. user is signed in, but if it's null then
  28. we throw in exception which decline should receive and
  29. redirect for sign in. Could it be more easy?
  30. Hm, you might say now. But what about security
  31. and privacy? Well, that is all taken care of
  32. by Google Sign in or a third party authentication provider.
  33. So this mechanism is the best of two worlds combined. A simple way
  34. to add user authentication to your app, combined with the strong security and
  35. privacy standards of Google, all right, that's enough talking, time for you do
  36. some coding again by adding user
  37. authentication to your Conference Central. Good luck.