@Tag(value="google-signin")
@NpmPackage(value="@polymer/font-roboto",version="3.0.0-pre.18") @NpmPackage(value="@polymer/iron-icon",version="3.0.0-pre.18") @NpmPackage(value="@polymer/iron-iconset-svg",version="3.0.0-pre.18") @NpmPackage(value="@polymer/iron-flex-layout",version="3.0.0-pre.18") @NpmPackage(value="@polymer/paper-ripple",version="3.0.0-pre.18") @NpmPackage(value="@polymer/paper-material",version="3.0.0-pre.18") @NpmPackage(value="@google-web-components/google-apis",version="3.0.0")
@JsModule(value="./google-signin.js")
public class GoogleSignin
extends com.vaadin.flow.component.Component
| Modifier and Type | Class and Description |
|---|---|
static class |
GoogleSignin.Brand |
static class |
GoogleSignin.Height |
static class |
GoogleSignin.Theme |
static class |
GoogleSignin.Width |
| Constructor and Description |
|---|
GoogleSignin(String clientId) |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addLoginListener(Consumer<UserLoginEvent> consumer)
Add listener for login action
|
com.vaadin.flow.shared.Registration |
addLogoutListener(Runnable action)
Add listener for logout action
NOTE: logout listeners are NOT informed of logout action,
if isAutoLogout is true
|
String |
getAppPackageName()
App package name for android over-the-air installs.
|
GoogleSignin.Brand |
getBrand()
The brand being used for logo and styling.
|
String |
getCookiePolicy()
The cookie policy defines what URIs have access to the session cookie
remembering the user's sign-in state.
|
boolean |
getFill()
By default the ripple expands to fill the button.
|
GoogleSignin.Height |
getHeight()
The height to use for the button.
|
String |
getLabelAdditional()
An optional label for the button for additional permissions.
|
String |
getLabelSignin()
An optional label for the sign-in button.
|
String |
getLabelSignout()
An optional label for the sign-out button.
|
boolean |
getRaised()
If true, the button will be styled with a shadow.
|
String |
getScopes()
The scopes to provide access to (e.g https://www.googleapis.com/auth/drive)
and should be space-delimited.
|
GoogleSignin.Theme |
getTheme()
The theme to use for the button.
|
GoogleSignin.Width |
getWidth()
The width to use for the button.
|
boolean |
isAutoLogout()
Tells if auto-logout is active:
if auto-logout is on then the google login is closed after successful
login.
|
void |
logout()
Logout current google login
|
void |
setAppPackageName(String value) |
void |
setAutoLogout(boolean autoLogout) |
void |
setBrand(GoogleSignin.Brand brand) |
void |
setCookiePolicy(String value) |
void |
setFill(boolean value) |
void |
setHeight(GoogleSignin.Height height) |
void |
setLabelAdditional(String value) |
void |
setLabelSignin(String value) |
void |
setLabelSignout(String value) |
void |
setRaised(boolean value) |
void |
setScopes(String value) |
void |
setTheme(GoogleSignin.Theme theme) |
void |
setWidth(GoogleSignin.Width width) |
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisiblepublic GoogleSignin(String clientId)
public com.vaadin.flow.shared.Registration addLoginListener(Consumer<UserLoginEvent> consumer)
consumer - that consumes the UserLoginEvent which has all user infopublic com.vaadin.flow.shared.Registration addLogoutListener(Runnable action)
action - Action to perform if logout is triggeredpublic void logout()
public boolean isAutoLogout()
public void setAutoLogout(boolean autoLogout)
public GoogleSignin.Brand getBrand()
public void setBrand(GoogleSignin.Brand brand)
public GoogleSignin.Width getWidth()
public void setWidth(GoogleSignin.Width width)
public GoogleSignin.Height getHeight()
public void setHeight(GoogleSignin.Height height)
public GoogleSignin.Theme getTheme()
public void setTheme(GoogleSignin.Theme theme)
public String getAppPackageName()
public void setAppPackageName(String value)
public String getCookiePolicy()
public void setCookiePolicy(String value)
public boolean getFill()
public void setFill(boolean value)
public String getLabelAdditional()
public void setLabelAdditional(String value)
public String getLabelSignin()
public void setLabelSignin(String value)
public String getLabelSignout()
public void setLabelSignout(String value)
public boolean getRaised()
public void setRaised(boolean value)
public String getScopes()
public void setScopes(String value)
Copyright © 2020 Vaadin Ltd. All rights reserved.