Skip to content

Instantly share code, notes, and snippets.

View ibrahimlawal's full-sized avatar

Ibrahim Lawal ibrahimlawal

View GitHub Profile
@ziluvatar
ziluvatar / token-generator.js
Last active April 11, 2024 07:10
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@ibrahimlawal
ibrahimlawal / HibeeRSA.h
Last active December 18, 2020 20:24
An Objective-C class that provides RSA encryption using SecKeyEncrypt on Mac10.7 and iPhone2.0 Remember to change the sample key to the base64 encoded string of your public key.
//
// HibeeRSA.h
//
// Created by Ibrahim Lawal (ibrahim@lawal.me) on Feb/27/2016.
//
#import <Foundation/Foundation.h>
@interface HibeeRSA : NSObject
+ (nullable NSString *)encryptRSA:(nonnull NSString *)plainTextString;
<?php
class HttpException extends \Exception
{
/**
* List of additional headers
*
* @var array
*/
private $headers = array();