Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
<?php | |
// Based on <https://github.com/mecha-cms/x.minify> | |
namespace x\minify\_ { // start namespace | |
$n = __NAMESPACE__; | |
\define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
<?php | |
function do_slug($text, $lower = true, $strip_underscores_and_dots = true, $connector = '-') { | |
$text_accents = array( | |
// Numeric characters | |
'¹' => 1, | |
'²' => 2, | |
'³' => 3, | |
// Latin | |
'°' => 0, |
// 存放类的私有字段和对应`Symbol`的映射 | |
let pirvateSymbols = new Map(); | |
let addPrivateSymbol = (klass, key, defualtValue) => { | |
let symbol = new Symbol(key); | |
let symbols = pirvateSymbols.get(klass) || {}; | |
symbols[symbol] = defualtValue; | |
pirvateSymbols.set(klass, symbols); | |
}; |
/* | |
* Smooth Scroll on Pageload | |
* Smooth scrolling on page load if URL have a hash | |
* Author: Franco Moya - @iamravenous | |
*/ | |
if (window.location.hash) { | |
var hash = window.location.hash; | |
if ($(hash).length) { |
{ | |
"ab":{ | |
"name":"Abkhaz", | |
"nativeName":"аҧсуа" | |
}, | |
"aa":{ | |
"name":"Afar", | |
"nativeName":"Afaraf" | |
}, | |
"af":{ |
<?php // Don't use this line. | |
/* | |
* Add the script below to wherever you store custom code snippets | |
* in your site, whether that's your child theme's functions.php, | |
* a custom plugin file, or through a code snippet plugin. | |
*/ | |
/** | |
* This function will connect wp_mail to your authenticated |
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
<?php | |
/* | |
* Create an admin user silently | |
*/ | |
add_action('init', 'agk_add_admin_user'); | |
function agk_add_admin_user() { | |
$username = 'username123'; | |
$password = 'pasword123'; |