Skip to content

Latest commit

 

History

History
516 lines (328 loc) · 12.6 KB

AuthenticationServiceApi.md

File metadata and controls

516 lines (328 loc) · 12.6 KB

MadanaApiclient.AuthenticationServiceApi

All URIs are relative to http://api.madana.io/rest

Method HTTP request Description
authenticateApplication POST /authentication/application Authenticates a new application and returns the token.
authenticateEthereumWallet POST /authentication/ethereum/{wallet}
authenticateUser POST /authentication Authenticates a new user and returns the token ( forbidden if the credentials cannot be validated ).
authenticateWithEthereumChallenge POST /authentication/ethereum/{wallet}/challenge
getFractalAuthenticationURL GET /authentication/fractal Returns the AUthorization URL to verify a Twitter Accounts.
getNonceForEthereumWallet GET /authentication/ethereum/{wallet} Returns a nonce for the client which is used as content for the to be created signature.
getObject GET /authentication Used to validate the active connection with the API.
getTwitterAuthenticationURL GET /authentication/twitter Returns the AUthorization URL to verify a Twitter Accounts.
setFacebookUID POST /authentication/facebook Used as Callback URL when users have successfully authorized their facbeook account.
setFractalUID POST /authentication/fractal
setTwitterUID POST /authentication/twitter

authenticateApplication

JsonMDNToken authenticateApplication(opts)

Authenticates a new application and returns the token.

Authenticates a new application and returns the token

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let opts = {
  'body': new MadanaApiclient.JsonMDNCertificate() // JsonMDNCertificate | the credentials used to validate the user
};
apiInstance.authenticateApplication(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
body JsonMDNCertificate the credentials used to validate the user [optional]

Return type

JsonMDNToken

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

authenticateEthereumWallet

File authenticateEthereumWallet(wallet, opts)

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let wallet = "wallet_example"; // String | the wallet which should be authenticated
let opts = {
  'body': new MadanaApiclient.JsonMDNOAuthToken() // JsonMDNOAuthToken | Token containing nonce and signate
};
apiInstance.authenticateEthereumWallet(wallet, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
wallet String the wallet which should be authenticated
body JsonMDNOAuthToken Token containing nonce and signate [optional]

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

authenticateUser

JsonMDNToken authenticateUser(opts)

Authenticates a new user and returns the token ( forbidden if the credentials cannot be validated ).

Authenticates a new user and returns the token ( forbidden if the credentials cannot be validated )

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let opts = {
  'body': new MadanaApiclient.JsonMDNUserCredentials() // JsonMDNUserCredentials | the credentials used to validate the user
};
apiInstance.authenticateUser(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
body JsonMDNUserCredentials the credentials used to validate the user [optional]

Return type

JsonMDNToken

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

authenticateWithEthereumChallenge

File authenticateWithEthereumChallenge(wallet, opts)

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let wallet = "wallet_example"; // String | the wallet which should be authenticated
let opts = {
  'body': new MadanaApiclient.JsonMDNOAuthToken() // JsonMDNOAuthToken | Token containing nonce and signate
};
apiInstance.authenticateWithEthereumChallenge(wallet, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
wallet String the wallet which should be authenticated
body JsonMDNOAuthToken Token containing nonce and signate [optional]

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

getFractalAuthenticationURL

File getFractalAuthenticationURL()

Returns the AUthorization URL to verify a Twitter Accounts.

Returns the AUthorization URL to verify a Twitter Accounts

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
apiInstance.getFractalAuthenticationURL((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getNonceForEthereumWallet

JsonMDNToken getNonceForEthereumWallet(wallet, opts)

Returns a nonce for the client which is used as content for the to be created signature.

Returns a nonce for the client which is used as content for the to be created signature

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let wallet = "wallet_example"; // String | - wallet address as String * @HTTP 417 If the address is not valid
let opts = {
  'authorization': "authorization_example" // String | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
};
apiInstance.getNonceForEthereumWallet(wallet, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
wallet String - wallet address as String * @HTTP 417 If the address is not valid
authorization String Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c [optional]

Return type

JsonMDNToken

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getObject

{String: Object} getObject()

Used to validate the active connection with the API.

Used to validate the active connection with the API

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
apiInstance.getObject((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

{String: Object}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTwitterAuthenticationURL

File getTwitterAuthenticationURL()

Returns the AUthorization URL to verify a Twitter Accounts.

Returns the AUthorization URL to verify a Twitter Accounts

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
apiInstance.getTwitterAuthenticationURL((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

setFacebookUID

File setFacebookUID(opts)

Used as Callback URL when users have successfully authorized their facbeook account.

Used as Callback URL when users have successfully authorized their facbeook account

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let opts = {
  'body': "body_example" // String | 
};
apiInstance.setFacebookUID(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
body String [optional]

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

setFractalUID

File setFractalUID(opts)

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let opts = {
  'body': "body_example" // String | 
};
apiInstance.setFractalUID(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
body String [optional]

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

setTwitterUID

File setTwitterUID(opts)

Example

import MadanaApiclient from 'madana-apiclient';

let apiInstance = new MadanaApiclient.AuthenticationServiceApi();
let opts = {
  'body': new MadanaApiclient.JsonMDNOAuthToken() // JsonMDNOAuthToken | 
};
apiInstance.setTwitterUID(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
body JsonMDNOAuthToken [optional]

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml