Questions to Ask Yourself Before Choosing

Before you embark upon a particular implementation path, you should ask yourself some questions about what you need in your specific application and what’s available to you from a particular provider that you are trying to integrate.

Does the provider I am working with support hybrid auth? Where can I find out?

The first question that you should ask yourself before embarking upon any approach is “What does my provider support?” Clearly, if you’re working with a service that’s an OpenID provider but does not offer OAuth, you should not be looking into a hybrid auth approach.

When working with a standard OpenID implementation, you simply need to find out two things:

  • Is the company that I am trying to allow a login for an OpenID provider?

  • What is that company’s discovery URL? (For a refresher on this topic, see the section OpenID Providers in Chapter 11.)

If the first answer is “yes,” and you have the discovery URL, you’re ready to begin integrating OpenID authentication into your site.

Now, if you’re looking into a hybrid auth approach, you’ll not only need to answer the preceding questions about OpenID, but also a number about OAuth and hybrid auth, such as:

  • Does the provider I’m working with support OAuth?

  • Does the provider I’m working with support hybrid auth to allow me to obtain a preapproved request token from OpenID, in order to exchange it for an OAuth access token?

If the answers to the preceding questions are also “yes,” then you are ready to leverage the powerful authentication and authorization functionality of a hybrid auth implementation.

If you answered “I don’t know” to any of the preceding questions, then you should check the provider’s documentation for the OpenID and OAuth specifications. Specifically, you’ll need an OpenID method for obtaining a preapproved request token at the end of the authentication process in order to implement a hybrid auth approach.

What information about the user am I trying to obtain?

Your next question when deciding between the different standards should be, “What information about the user do I actually need?” This is an important question for a few reasons:

  • If you simply want to offload user authentication to another provider without having to store user credentials, or want to avoid the privacy concerns associated with storing those details, then there is absolutely no reason for you to incur the overhead and effort of implementing OAuth. If, on the other hand, you want to leverage an existing user social graph, then the OAuth implementation is your best option for accessing a great deal of data.

  • The provider that you are working with will most likely have a “Terms of Use” document that outlines what information about its users you are allowed to store in your own systems, and for how long. If you try to store every piece of information about a user permanently (through the OAuth process), you will more than likely be violating the provider’s terms of use.

Beyond the terms of use and authentication offload considerations, you should also be concerned about incurring an overhead that you simply may not need. We’ve touched on this already, but the point should be stressed. So, let’s take a look at this factor in a little more detail by comparing the pros and cons of each implementation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.79.20