Skip to content

Next Step Server REST API Reference

Roman Štrobl edited this page Aug 5, 2017 · 69 revisions

PowerAuth 2.0 Web Auth Server communicates with the Next Step Server via a REST API to resolve the next step in the authentication process. This chapter defines the REST API implemented by Next Step Server and consumed by the Web Auth Server during authentication.

The Next Step Server API is also used by other services involved in the authentication process (e.g. Mobile Token).

Status codes and error handling

PowerAuth 2.0 Web Auth Server uses a unified format for error response body, accompanied with an appropriate HTTP status code. Besides the HTTP error codes that application server may return regardless of server application (such as 404 when resource is not found or 503 when server is down).

The list of error status codes:

Code Description
200 OK response - REST API call succeeded
500 Server error - details in the message

All error responses that are produced by the Next Step Server have following body:

{
    "status": "ERROR",
    "responseObject": {
        "code": "ERROR_CODE",
        "message": "ERROR_MESSAGE_I18N_KEY"
    }
}

Authentication methods

List authentication methods

Lists all authentication methods supported by the server.

Method POST
Resource URI /auth-method/list

Request

  • Headers:
    • Content-Type: application/json
{
    "requestObject": {        
    }
}

Response

  • Status Code: 200
  • Headers:
    • Content-Type: application/json
{
    "status": "OK",
    "responseObject": {
    "authMethods": [
    {
        "authMethod": "INIT",
        "hasUserInterface": false,
        "displayNameKey": null
    },
    {
        "authMethod": "USER_ID_ASSIGN",
        "hasUserInterface": false,
        "displayNameKey": null
    },
    {
        "authMethod": "USERNAME_PASSWORD_AUTH",
        "hasUserInterface": true,
        "displayNameKey": "method.username_password"
    },
    {
        "authMethod": "POWERAUTH_TOKEN",
        "hasUserInterface": true,
        "displayNameKey": "method.powerauth_token"
    },
    {
        "authMethod": "SHOW_OPERATION_DETAIL",
        "hasUserInterface": true,
        "displayNameKey": "method.show_operation_detail"
    },
    {
        "authMethod": "SMS_KEY",
        "hasUserInterface": true,
        "displayNameKey": "method.sms_key"
    }
    ],
  }
}

Clone this wiki locally