%PDF- %PDF-
Direktori : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/auth-google/authclient/ |
Current File : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/auth-google/authclient/GoogleAuth.php |
<?php namespace humhubContrib\auth\google\authclient; use yii\authclient\clients\Google; /** * Google allows authentication via Google OAuth. */ class GoogleAuth extends Google { /** * @inheritdoc */ protected function defaultViewOptions() { return [ 'popupWidth' => 860, 'popupHeight' => 480, 'cssIcon' => 'fa fa-google', 'buttonBackgroundColor' => '#e0492f', ]; } /** * @inheritdoc */ protected function defaultNormalizeUserAttributeMap() { return [ 'username' => 'displayName', 'firstname' => function ($attributes) { if (!isset($attributes['given_name'])) { return ''; } return $attributes['given_name']; }, 'lastname' => function ($attributes) { if (!isset($attributes['family_name'])) { return ''; } return $attributes['family_name']; }, 'title' => 'tagline', 'email' => function ($attributes) { return $attributes['email']; }, ]; } }