The Mirror Code
With our list of tasks in order, now we get to implement the behavior we expect from our Glassware extension.
Adding Google Glass authorization requires that a user already have a Google account. All Glass users must have one for Glass to function, so luckily you’ll never have to deal with the case where a user doesn’t have an account. However, that doesn’t mean your application employs any of Google’s user-management systems, like OpenID or OAuth. When integrating Glassware into your existing app, you’ll have to give some thought to how your own user-management system can associate its accounts with the necessary Google account.
One option is to have a user first log in to your own app, keeping her credentials ...