카카오로그인 연동 방식 변경

-oauth 테이블 삭제
-비밀번호 변경 기능 추가(카카오톡 나에게 보내기)
This commit is contained in:
2018-03-18 05:44:20 +09:00
parent bd26ee858c
commit 6130bd22cb
8 changed files with 149 additions and 39 deletions
+23 -1
View File
@@ -203,4 +203,26 @@ function toInt($val, $force=false){
return intval($val);
}
throw new InvalidArgumentException('올바르지 않은 타입형 :'.$val);
}
}
/**
* Generate a random string, using a cryptographically secure
* pseudorandom number generator (random_int)
*
* For PHP 7, random_int is a PHP core function
* For PHP 5.x, depends on https://github.com/paragonie/random_compat
*
* @param int $length How many characters do we want?
* @param string $keyspace A string of all possible characters
* to select from
* @return string
*/
function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
{
$str = '';
$max = mb_strlen($keyspace, '8bit') - 1;
for ($i = 0; $i < $length; ++$i) {
$str .= $keyspace[random_int(0, $max)];
}
return $str;
}