2019-02-12 09:26:46 +01:00
< ? php
/**
2024-05-27 10:08:53 +02:00
* SPDX - FileCopyrightText : 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX - License - Identifier : AGPL - 3.0 - or - later
2019-02-12 09:26:46 +01:00
*/
style ( 'core' , 'login/authpicker' );
2021-11-03 10:54:02 +01:00
script ( 'core' , 'login/authpicker' );
2019-02-12 09:26:46 +01:00
/** @var array $_ */
/** @var \OCP\IURLGenerator $urlGenerator */
$urlGenerator = $_ [ 'urlGenerator' ];
?>
< div class = " picker-window " >
< h2 >< ? php p ( $l -> t ( 'Connect to your account' )) ?> </h2>
< p class = " info " >
< ? php print_unescaped ( $l -> t ( 'Please log in before granting %1$s access to your %2$s account.' , [
2020-04-09 09:22:29 +02:00
'<strong>' . \OCP\Util :: sanitizeHTML ( $_ [ 'client' ]) . '</strong>' ,
\OCP\Util :: sanitizeHTML ( $_ [ 'instanceName' ])
])) ?>
2019-02-12 09:26:46 +01:00
</ p >
2022-07-18 17:58:05 +02:00
< div class = " notecard warning " >
2021-07-05 15:42:37 +02:00
< h3 >< ? php p ( $l -> t ( 'Security warning' )) ?> </h3>
2021-06-23 15:12:03 +02:00
< p >
< ? php p ( $l -> t ( 'If you are not trying to set up a new device or app, someone is trying to trick you into granting them access to your data. In this case do not proceed and instead contact your system administrator.' )) ?>
</ p >
2022-07-18 17:58:05 +02:00
</ div >
2020-07-06 13:44:12 +02:00
2019-02-12 09:26:46 +01:00
< br />
< p id = " redirect-link " >
2022-07-27 09:17:37 +02:00
< form id = " login-form " action = " <?php p( $urlGenerator->linkToRouteAbsolute ('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'] , 'user' => $_['user'] ])) ?> " method = " get " >
2023-01-22 11:56:31 +01:00
< input type = " submit " class = " login primary icon-confirm-white " value = " <?php p( $l->t ('Log in')) ?> " disabled >
2022-07-18 17:58:05 +02:00
</ form >
2019-02-12 09:26:46 +01:00
</ p >
2021-11-03 10:54:02 +01:00
< form action = " <?php p( $urlGenerator->linkToRouteAbsolute ('core.ClientFlowLoginV2.apptokenRedirect')); ?> " method = " post " id = " app-token-login-field " class = " hidden " >
< p class = " grouptop " >
2024-02-13 14:37:09 +01:00
< input type = " text " name = " user " id = " user " placeholder = " <?php p( $l->t ('Login')) ?> " >
< label for = " user " class = " infield " >< ? php p ( $l -> t ( 'Login' )) ?> </label>
2021-11-03 10:54:02 +01:00
</ p >
< p class = " groupbottom " >
2023-12-07 20:30:00 +01:00
< input type = " password " name = " password " id = " password " placeholder = " <?php p( $l->t ('App password')) ?> " >
2021-11-03 10:54:02 +01:00
< label for = " password " class = " infield " >< ? php p ( $l -> t ( 'Password' )) ?> </label>
</ p >
< input type = " hidden " name = " stateToken " value = " <?php p( $_['stateToken'] ) ?> " />
< input type = " hidden " name = " requesttoken " value = " <?php p( $_['requesttoken'] ) ?> " >
< input id = " submit-app-token-login " type = " submit " class = " login primary icon-confirm-white " value = " <?php p( $l->t ('Grant access')) ?> " >
</ form >
2021-12-03 08:44:09 +01:00
< ? php if ( empty ( $_ [ 'oauthState' ])) : ?>
2023-12-07 20:30:00 +01:00
< a id = " app-token-login " class = " apptoken-link " href = " # " >< ? php p ( $l -> t ( 'Alternative log in using app password' )) ?> </a>
2021-12-03 08:44:09 +01:00
< ? php endif ; ?>
2019-02-12 09:26:46 +01:00
</ div >