Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

Windows Communication Foundation (WCF) Services

In a .Net environment (Visual Studio 2005, - Visual Studio 2015) you can access the SAS WCF services by adding a service reference to your project. The service reference should be to the following endpoint:

       https://sandbox.surepassid.com/AuthServerWCFService/SurePassAuthServerWCFService.svc

When you create the service reference Visual Studio will create a proxy class to the SAS service that makes accessing the server very easy hiding the complexity of web service Soap messages. This proxy class will contain all the methods that are supported by the SAS server. Each method in the proxy class maps directly to the same methods in the Rest/Json interface.

REST Interface

The REST interface provides a simple and easy RESTful interface to the MFAS services. This interface is recommended for integrating the MFAS services into the following applications:

  • PHP apps
  • Python apps
  • .net apps
  • Java apps
  • any server based app that supports REST

The format of the REST requests are:

http POST to:

https://server/AuthServer/REST/U2F/U2FServer.aspx

where server is:

The REST request body is a json structure that specifies the type of action to be performed. All requests have the following common parameters:

  • 'type' – The type of request to be  performed  by the server.  The following types are supported.
  • 'username' – The username (or token for the user) that this action is to be performed on.
  • 'spAccountLoginName'  – Your SurePassId server account name
  • 'spAccountLoginKey' – Your SurePassId server account  key


You can get your SurePass account credentials (server account name and key) from the the portal.  After logging in go to Settings and you will see the following page where the values are displayed

The system supports the following request api functions:


typedescriptionoperational area
add_u2f_accountadd user account with U2F device to your SurepassId installationuser management
add_oath_accountadd user account with Oath device to your SurepassId installationuser management
add_u2f_deviceadd a u2f  2fa device to a user account device management
add_oath_deviceadd an oath 2fa device to user account device management
validate_userquery user meta data/authenticate user name and passworduser validation/authentication
find_devicequery device meta data by serial numberdevice management
delete_key delete a specific fido u2f security key from the users account fido u2f key/origin management
delete_all_keysdelete all fido u2f security key from the users account fido u2f key/origin management
validate_oath_otp validate a dynamic pass code send to the uservalidate Oath OTP
send_oath_otpsend a dynamic pass code send to the usersend Oath OTP
push_oath_otppush authentication request to the userpush authentication
pre_enrollfido - pre-enroll u2f key for an origin fido u2f register step 1
enrollfido - enroll a u2f key for an origin fido u2f register step 2
pre_signfido - pre-sign process u2f key for an origin fide u2f authentication step 1
sign fido - authenticate a u2f key for an origin fido u2f authentication step 2
create_session_token create a session token for a particular  usermobile device state management
expire_session_tokenexpire (make unusable) a session token for a particular usermobile device state management
is_session_token_valid check to see if a session token is still valid for a particular user mobile device state management
active_oath_deviceactivate an Oath devicedevice management
sync_oath_devicesynchronize clock for Oath HOTP/TOTP devicedevice management

A sample REST request body is a json request and looks like this:

Rest/Json Request Example - Send Pass Code via SMS
{ 
  "type": "send_oath_otp",
  "username": "Manny",
  "spAccountLoginName": "accountname", 
  "spAccountLoginKey": "accountkey",
  "deliveryMethod": "sms"
}  

 

The REST response body is a json structure. All responses have the following items at a minimum:

 

  • type - Echo of the type that was made on the request
  • errorCode – The numeric error code for the request.  An errorCode of 0 signifies success.
  • errorMessage – The displayable  error message for the request. 


Rest/Json Response Example - Send Pass Code
{
  "type": "send_oath_otp",
  "errorCode": 0,
  "errorMessage": "OK"
}



  • No labels