Skip to content

[MIRROR] SDK for integrating GERAS auth into applications

Notifications You must be signed in to change notification settings

itkaufmann/geras-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GERAS SDK

SDK for integrating GERAS auth into applications

Usage

Install via Composer: composer require itkfm/geras-sdk

// Server URL
$gerasServerApiUrl = 'https://geras.test/api';
// Application ID (as registered on the server)
$gerasApplicationID = 1234;
// Secret API key (Base64 encoded) of the Application
$mySecretKey = '';

// Configure API key
$apiKey = new ApiKey($gerasServerApiUrl, $gerasApplicationID, $mySecretKey);

// Choose your API Client implementation
// `HttpApiClient` (built upon Guzzle) is provided out of the box
// You can also implement your own one, see `ApiClientInterface`
$transportLayer = new HttpApiClient($apiKey, new GuzzleHttp\Client());

// Setup dependencies
$messagePacker = new MessagePacker(new JsonMapper());

// Create client
$geras = new GerasClient($transportLayer, $messagePacker);

About

[MIRROR] SDK for integrating GERAS auth into applications

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages