6 changed files with 163 additions and 116 deletions
@ -0,0 +1,90 @@
|
||||
<?php |
||||
|
||||
return [ |
||||
'form' => [ |
||||
'activo' => (!empty($_SERVER['PERFIL'])) && ($_SERVER['PERFIL'] == 'alumno'), |
||||
'clase' => 'modelo\\autenticacion\\auth_form', |
||||
'parametros' => [ |
||||
'clase_login' => "extension_kernel\\login" |
||||
] |
||||
], |
||||
|
||||
'form_documento' => [ |
||||
'activo' => (!empty($_SERVER['PERFIL'])) && ($_SERVER['PERFIL'] == 'alumno'), |
||||
'clase' => 'modelo\\autenticacion\\auth_form_documento', |
||||
'parametros' => [ |
||||
'clase_login' => "extension_kernel\\login" |
||||
] |
||||
], |
||||
|
||||
'admin' => [ |
||||
'activo' => (!empty($_SERVER['PERFIL'])) && ($_SERVER['PERFIL'] == 'admin'), |
||||
'clase' => 'modelo\\autenticacion\\auth_admin', |
||||
'parametros' => [ |
||||
'clase_login' => "extension_kernel\\login_admin" |
||||
] |
||||
], |
||||
|
||||
'token' => [ |
||||
'activo' => (!empty($_SERVER['PERFIL'])) && ($_SERVER['PERFIL'] == 'alumno'), |
||||
'clase' => 'modelo\\autenticacion\\auth_token', |
||||
'parametros' => [], |
||||
], |
||||
|
||||
'cuentas_ext' => [ |
||||
/** |
||||
* Si desea habilitarse alguno de los servicios de login con servicios externos, |
||||
* primero se debe establecer la siguiente directiva en true |
||||
*/ |
||||
'activo' => false, |
||||
'clase' => 'modelo\\autenticacion\\auth_cuenta_ext', |
||||
'parametros' => [ |
||||
'clase_login' => "extension_kernel\\login", |
||||
'proveedores' => [ |
||||
'google' => [ |
||||
/** |
||||
* Para habilitar el login mediante Google: |
||||
* + establecer 'activo' => true, |
||||
* + crear un proyecto en https://console.developers.google.com/ |
||||
* + habilitar la Google+ API y obtener los valores de ID y secreto de cliente para completar aquí. |
||||
* + En la sección URIs de redireccionamiento completar http://<url_preinscripcion_completa>/acceso/index?auth=cuentas_ext&f=google |
||||
*/ |
||||
'activo' => false, |
||||
'tipo' => 'oauth2', |
||||
'icono' => 'img/login/google.jpg', |
||||
'app_key' => 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.apps.googleusercontent.com', |
||||
'app_secret' => 'xxxxxxxxxxxxxxxxxxxxxxx', |
||||
'scope' => 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email', |
||||
|
||||
'auth_url' => 'https://accounts.google.com/o/oauth2/auth', |
||||
'acc_url' => 'https://accounts.google.com/o/oauth2/token', |
||||
'id_url' => 'https://www.googleapis.com/oauth2/v1/userinfo', |
||||
|
||||
'id_path' => 'id', //de que campo saca el id |
||||
'email_path' => 'email', //de que campo saca el mail |
||||
], |
||||
|
||||
'facebook' => [ |
||||
/** |
||||
* Para habilitar el login mediante Facebook, establecer 'activo' => true |
||||
* y generar valores para app_key y app_secret como se explica en |
||||
* https://repositorio.siu.edu.ar/trac/Portal-G3/wiki/G2/Preinscripcion/2.9.0/DocTecnica/Instalacion/ConfigFacebook |
||||
*/ |
||||
'activo' => false, |
||||
'tipo' => 'oauth2', |
||||
'icono' => 'img/login/facebook.jpg', |
||||
'app_key' => 'xxxxxxxxxxxxxxx', |
||||
'app_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', |
||||
'scope' => 'email', |
||||
|
||||
'auth_url' => 'https://www.facebook.com/dialog/oauth', |
||||
'acc_url' => 'https://graph.facebook.com/oauth/access_token', |
||||
'id_url' => 'https://graph.facebook.com/me', |
||||
|
||||
'id_path' => 'id', |
||||
'email_path' => 'email', |
||||
], |
||||
], |
||||
], |
||||
], |
||||
]; |
||||
Loading…
Reference in new issue