Skip to content

Instantly share code, notes, and snippets.

@DragonBe
DragonBe / auth-standard-requirements.md
Last active August 16, 2021 07:03
The common pattern for user registration, sign in, reset and removal of an account written out

Auth Stnadard Requirements

Problem statement

To tackle the common application pattern for authenticating, registering, resetting credentials, verifying, and unregistering from an application, the common patterns exists but many implementations make it hard to use the best solutions of different frameworks. While almost each application has this requirement, no standard has been defined.

Possible reasons why it's difficult

  • Too many backend solutions for storing and updating credentials (DB, LDAP/AD, API, SSO, SAML, …)
  • Added complexity when authorisation is required
  • Added complexity when MFA is required
@paragonie-scott
paragonie-scott / JWTKiller.php
Created March 14, 2017 21:37
PHP 7.2 Replacement for JWT
<?php
declare(strict_types=1);
use ParagonIE\ConstantTime\Base64UrlSafe;
class JWTKiller
{
public static function sign(string $message, Key $key): string
{
$mac = sodium_crypto_auth($message, $key->getRaw());
@frankdejonge
frankdejonge / example.php
Last active May 21, 2017 17:41
Mirco-time precise DateTime(Immutable) instances.
<?php
function mirco_time_precise_date_time_immutable()
{
return DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
}
@chanj
chanj / AWS Security Resources
Last active June 21, 2021 09:49
AWS Security Resources
INTRO
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute.
Short Link: http://tiny.cc/awssecurity
Official AWS Security Resources
* Security Blog - http://blogs.aws.amazon.com/security/
* Security Advisories - http://aws.amazon.com/security/security-bulletins/
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf
@jcouyang
jcouyang / all github 887 emojis.md
Last active February 5, 2018 08:05
all github 887 emoji

💯 👍 👎 🔢 🎱 🅰️ 🆎 🔤 🔡 🉑 🚡 ✈️ ⏰ 👽 🚑 ⚓ 👼 💢 😠 😧 🐜 🍎 ♒ ♈ ◀️ ⏬ ⏫ ⬇️ 🔽 ▶️ ⤵️ ⤴️ ⬅️ ↙️ ↘️ ➡️ ↪️ ⬆️ ↕️ 🔼 ↖️ ↗️ 🔃 🔄 🎨 🚛 😲 👟 🏧 🅱️ 👶 🍼 🐤 🚼 🔙 🛄 🎈 ☑️ 🎍 🍌 ‼️ 🏦 📊 💈 ⚾ 🏀 🛀 🛁 🔋 🐻 🐝 🍺 🍻 🪲 🔰 🔔 🍱 🚴 🚲 👙 🐦 🎂 ⚫ 🃏 ⬛ ◾ :

@zQueal
zQueal / awesome-php.md
Last active December 16, 2019 18:39 — forked from ziadoz/awesome-php.md
@Ocramius
Ocramius / Foo.php
Last active March 12, 2021 14:14
Self hydrating object proxy in PHP Provides faster hydration by removing the need for reflection.
<?php
class Foo
{
protected $foo;
protected $bar;
protected $baz;
}
@l4ci
l4ci / trash_email.php
Last active December 15, 2015 03:29
Check Email Domain for trash/one-way-email #php
<?php
/**
* Checks Email Domain for trashmail
*
* @param string $email
* @return boolean true/false
*/
function trash_email($email){
$array = explode("@",$email);
$domain = $array[1];
@adamloving
adamloving / temporary-email-address-domains
Last active May 31, 2024 15:43
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@marteinn
marteinn / email_disposable.py
Created September 11, 2012 14:30
email_disposable.py - Validate if email is disposable
__author__ = 'martinsandstrom'
"""
SOURCE:
Most of the sources come from:
http://torvpn.com/temporaryemail.html
USAGE:
import email_disposable