Skip to content

Instantly share code, notes, and snippets.

@rcosgrave
rcosgrave / README.md
Last active January 11, 2019 17:58
Animate HTML Elements as they come into viewport
@rcosgrave
rcosgrave / AzureOAuthB2C.php
Last active November 1, 2022 12:00
A quick and dirty implementation of Azure's Active Directory B2C OAuth2 Service using Authorization Code Grant (external libraries required)
<?php
/** This is a simple class to allow for fast implementation of Azure's Active Direct B2C OAuth Service via Authorization Code scope
** It requires the use of the following repos
** https://github.com/firebase/php-jwt
** https://github.com/phpseclib/phpseclib/tree/master/phpseclib (Please note to get this to work I had to move the Math directory inside the Crypt directory)
** Sample Configuration https://login.microsoftonline.com/fabrikamb2c.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=b2c_1_sign_in
** Sample Key Location https://login.microsoftonline.com/fabrikamb2c.onmicrosoft.com/discovery/v2.0/keys?p=b2c_1_sign_in
*/
use \Firebase\JWT\JWT;