Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 542 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 542 Bytes

node_api_auth_server

An HMAC server compatble with: https://github.com/mgomes/api_auth

A client is available here: https://github.com/jlwebster/node_api_auth_client

To use:

var ApiAuth = require('api_auth');
var apiAuth = new ApiAuth( function( id , secret ){
	//this function is called by api_auth and asks for a secret based on the provided id;
	if( id === "ID" ) {
		secret( "SECRET" );
	}
}
});

apiAuth.check( request , body , function( error , is_authenticated , id ) {
	if( is_authenticated) {
		...
	}
}
});