...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var capi, credentials = { login: 'admin', password: 'publish', }; capi = new eZ.CAPI( 'http://example.com', new eZ.BasicAuthAgentHttpBasicAuthAgent(credentials) ); capi.logIn(function (error, response) { if ( error ) { console.log('Error!'); return; } console.log("The credentials are valid"); }); |
...