2017 © Pedro Peláez
 

library passport

Fork of official Laravel Passport with support for string-based Client IDs

image

edsamonte/passport

Fork of official Laravel Passport with support for string-based Client IDs

  • Saturday, October 7, 2017
  • by edmandiesamonte
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 375 Forks
  • 0 Open issues
  • 53 Versions
  • 0 % Grown

The README.md

, (*1)

Build Status Total Downloads Latest Stable Version License , (*2)

Introduction

This is a fork of the official Laravel Passport to support string-based OAuth2 Client IDs, (*3)

Laravel Passport is an OAuth2 server and API authentication package that is simple and enjoyable to use., (*4)

Installation

composer require edsamonte/passport dev-master

Official Documentation

Documentation for Passport can be found on the Laravel website., (*5)

Custom Client ID generator

Code example:, (*6)

Passport::setClientIdGenerator(function($clientName){
    return str_slug($clientName) . "-" . bin2hex(random_bytes(2));
});

This example will generate something like mobile-app-client-f8, (*7)

This is helpful if you want to generate fixed-length Client IDs and to discourage brute-force Client ID guess attacks., (*8)

License

Laravel Passport is open-sourced software licensed under the MIT license., (*9)

The Versions