| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2016 The LUCI Authors. All rights reserved. | 2 Copyright 2016 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. | 4 that can be found in the LICENSE file. |
| 5 | 5 |
| 6 The `auth-signin` element displays sign-in/sign-out button, user email and | 6 The `auth-signin` element displays sign-in/sign-out button, user email and |
| 7 avatar. | 7 avatar. |
| 8 It has a google-signin/google-signin-aware element under the hood that handles | 8 It has a google-signin/google-signin-aware element under the hood that handles |
| 9 the actual OAuth logic. | 9 the actual OAuth logic. |
| 10 | 10 |
| 11 Usage: | 11 Usage: |
| 12 | 12 |
| 13 <auth-signin></auth-signin> | 13 <auth-signin></auth-signin> |
| 14 | 14 |
| 15 Properties: | 15 Properties: |
| 16 authHeaders: Object, Use this in iron-ajax to set oauth2 headers. | 16 authHeaders: Object, Use this as an argument to sk.request to set oauth2 hea
ders. |
| 17 authResponse: Object, The raw gapi.auth2.AuthResponse object. | 17 authResponse: Object, The raw gapi.auth2.AuthResponse object. |
| 18 clientId: String, The client id to authenticate | 18 clientId: String, The client id to authenticate |
| 19 profile: Object, Read Only, The email address and imageurl of the logged in
user. | 19 profile: Object, Read Only, The email address and imageurl of the logged in
user. |
| 20 signedIn: Boolean, Read Only, if the user is logged in. | 20 signedIn: Boolean, Read Only, if the user is logged in. |
| 21 | 21 |
| 22 Methods: | 22 Methods: |
| 23 signIn(): Signs the user in by popping up the authorization dialog. | 23 signIn(): Signs the user in by popping up the authorization dialog. |
| 24 signOut(): Signs the user out. | 24 signOut(): Signs the user out. |
| 25 | 25 |
| 26 Events: | 26 Events: |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 signIn: function() { | 124 signIn: function() { |
| 125 this.$.aware.signIn(); | 125 this.$.aware.signIn(); |
| 126 }, | 126 }, |
| 127 | 127 |
| 128 signOut: function() { | 128 signOut: function() { |
| 129 this.$.aware.signOut(); | 129 this.$.aware.signOut(); |
| 130 } | 130 } |
| 131 }); | 131 }); |
| 132 </script> | 132 </script> |
| 133 </dom-module> | 133 </dom-module> |
| OLD | NEW |