Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 14... Línea 14...
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea 16...
16
 
16
 
Línea 17... Línea -...
17
namespace factor_webauthn;
-
 
18
 
-
 
19
defined('MOODLE_INTERNAL') || die();
-
 
20
 
-
 
21
require_once($CFG->libdir . '/webauthn/src/WebAuthn.php');
17
namespace factor_webauthn;
22
 
18
 
23
use lbuchs\WebAuthn\Binary\ByteBuffer;
19
use lbuchs\WebAuthn\Binary\ByteBuffer;
24
use lbuchs\WebAuthn\WebAuthn;
20
use lbuchs\WebAuthn\WebAuthn;
25
use lbuchs\WebAuthn\WebAuthnException;
21
use lbuchs\WebAuthn\WebAuthnException;
Línea 114... Línea 110...
114
    public function show_setup_buttons(): bool {
110
    public function show_setup_buttons(): bool {
115
        return true;
111
        return true;
116
    }
112
    }
Línea 117... Línea 113...
117
 
113
 
-
 
114
    /**
-
 
115
     * Returns true if an additional setup button should be shown on the preferences page.
-
 
116
     *
-
 
117
     * @return bool
-
 
118
     */
-
 
119
    public function show_additional_setup_button(): bool {
-
 
120
        return true;
-
 
121
    }
-
 
122
 
118
    /**
123
    /**
119
     * WebAuthn factor implementation.
124
     * WebAuthn factor implementation.
120
     *
125
     *
121
     * @param stdClass $user
126
     * @param stdClass $user
122
     * @return array
127
     * @return array
Línea 154... Línea 159...
154
    public function get_setup_string(): string {
159
    public function get_setup_string(): string {
155
        return get_string('setupfactorbutton', 'factor_webauthn');
160
        return get_string('setupfactorbutton', 'factor_webauthn');
156
    }
161
    }
Línea 157... Línea 162...
157
 
162
 
-
 
163
    /**
-
 
164
     * Gets the string for additional setup button on preferences page.
-
 
165
     *
-
 
166
     * @return string
-
 
167
     */
-
 
168
    public function get_additional_setup_string(): string {
-
 
169
        return get_string('setupfactorbuttonadditional', 'factor_webauthn');
-
 
170
    }
-
 
171
 
158
    /**
172
    /**
159
     * Gets the string for manage button on preferences page.
173
     * Gets the string for manage button on preferences page.
160
     *
174
     *
161
     * @return string
175
     * @return string
162
     */
176
     */