public class SomServicesWs extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SomServicesWs.ErrorCodes |
static class |
SomServicesWs.PortalData
Container-object, which holds the transaction data.
|
static class |
SomServicesWs.ServicesWSFault |
static class |
SomServicesWs.UserData
Container-object, which holds the data required verify an OTP.
|
Constructor and Description |
---|
SomServicesWs() |
Modifier and Type | Method and Description |
---|---|
boolean |
assignTokenToUser(String userID,
String tokenSnr,
String activationData,
String otp)
Assigns a token to a specified user, if the delivered activation data match
the activation data stored in the database and the OTP is successfully verified.
|
boolean |
assignTokenToUserWithAtc(String userID,
String tokenSnr,
String activationData,
String otp,
Integer atc)
Assigns a token to a specified user, if the delivered activation data match
the activation data stored in the database and the OTP is successfully verified.
|
boolean |
checkOTP(SomServicesWs.UserData userData,
SomServicesWs.PortalData portalData)
Verifies OTP requests (linked to transaction data) with portal data.
|
boolean |
checkStaticOTP(SomServicesWs.UserData userData)
Verifies static OTP requests (not linked to transaction data) without portalData.
|
String |
getChallenge(String userID)
Returns a challenge for a user.
|
byte |
getDeviceRTC(String userID)
Gets the retry counter for a given user.
|
boolean |
resyncOTP(SomServicesWs.UserData userData,
int atc)
Re-synchronize a token for a given user.
|
public boolean checkStaticOTP(SomServicesWs.UserData userData) throws SomServicesWs.ServicesWSFault
userData
- Container-object, which holds the data required to verify an OTP for an user (see SomServicesWs.UserData
).true
if the OTP could be verified. false
if the verification does not succeed.SomServicesWs.ServicesWSFault
- SomServicesWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomServicesWs.ErrorCodes.INVALID_OTP_USERDATA
if the userData was not set.
SomServicesWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist or the user does not exist.
SomServicesWs.ErrorCodes.INVALID_USERID
if the the user id is not set.
SomServicesWs.ErrorCodes.INVALID_OTP
if the format of the otp is invalid.
SomServicesWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomServicesWs.ErrorCodes.CHALLENGE_WRONG
if the challenge is wrong.
SomServicesWs.ErrorCodes.CHALLENGE_TIMEOUT
if the challenge has expired.
SomServicesWs.ErrorCodes.TOKEN_WRONG_STATE
if the token state is invalid: RetryCounter exceeded, token locked, ServerPIN missing but required,
ServerPIN provided but not required, ServerPIN wrong.
SomServicesWs.ErrorCodes.OTP_OR_VISDATA_OUT_OF_RANGE
if the otp or visdata is invalid.public boolean checkOTP(SomServicesWs.UserData userData, SomServicesWs.PortalData portalData) throws SomServicesWs.ServicesWSFault
userData
- Container-object, which holds the data required to verify an OTP for an user (see SomServicesWs.UserData
).portalData
- Container-object, which holds the transaction data (see SomServicesWs.PortalData
).true
if the OTP could be verified. false
if the verification does not succeed.SomServicesWs.ServicesWSFault
- SomServicesWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomServicesWs.ErrorCodes.INVALID_OTP_USERDATA
if the userData was not set.
SomServicesWs.ErrorCodes.INVALID_OTP_PORTALDATA
if the portalData was not set.
SomServicesWs.ErrorCodes.OTP_PORTALDATA_WRONG
if the portalData was invalid (BaseDataElements not set, OrderClass not set, OtpLanguage() not set).
SomServicesWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist or the user does not exist.
SomServicesWs.ErrorCodes.INVALID_USERID
if the the user id is not set.
SomServicesWs.ErrorCodes.INVALID_OTP
if the format of the otp is invalid.
SomServicesWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomServicesWs.ErrorCodes.CHALLENGE_WRONG
if the challenge is wrong.
SomServicesWs.ErrorCodes.CHALLENGE_TIMEOUT
if the challenge has expired.
SomServicesWs.ErrorCodes.TOKEN_WRONG_STATE
if the token state is invalid: RetryCounter exceeded, token locked, ServerPIN missing but required,
ServerPIN provided but not required, ServerPIN wrong.
SomServicesWs.ErrorCodes.OTP_OR_VISDATA_OUT_OF_RANGE
if the otp or visdata is invalid.public String getChallenge(String userID) throws SomServicesWs.ServicesWSFault
userID
- A unique userID for the user.SomServicesWs.ServicesWSFault
- SomServicesWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomServicesWs.ErrorCodes.INVALID_USERID
if the the user id is not set.
SomServicesWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomServicesWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist or the user does not exist.
SomServicesWs.ErrorCodes.TOKEN_WRONG_STATE
if the token state is invalid: RetryCounter exceeded, token locked.public boolean resyncOTP(SomServicesWs.UserData userData, int atc) throws SomServicesWs.ServicesWSFault
userData
- Container-object, which holds the data required to verify an OTP for an user (see SomServicesWs.UserData
).atc
- The current application transaction counter at the token. It was used to calculate the OTP.true
if the re-sync succeeded. false
if the re-sync did not succeed.SomServicesWs.ServicesWSFault
- SomServicesWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomServicesWs.ErrorCodes.INVALID_OTP_USERDATA
if the userData was not set.
SomServicesWs.ErrorCodes.INVALID_USERID
if the the user id is not set.
SomServicesWs.ErrorCodes.INVALID_ATC
if the atc is out the range 0 until 65536.
SomServicesWs.ErrorCodes.INVALID_OTP
if the format of the otp is invalid.
SomServicesWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomServicesWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist or the user does not exist.
SomServicesWs.ErrorCodes.TOKEN_WRONG_STATE
if the token state is invalid: RetryCounter exceeded, token locked, ServerPIN missing but required,
ServerPIN provided but not required, ServerPIN wrong.
SomServicesWs.ErrorCodes.OTP_OR_VISDATA_OUT_OF_RANGE
if the otp or visdata is invalid.public boolean assignTokenToUser(String userID, String tokenSnr, String activationData, String otp) throws SomServicesWs.ServicesWSFault
userID
- The unique userID for the user.tokenSnr
- The serial number of the token.activationData
- The activation data.otp
- One time password.true
if the token was successfully assigned to the given user. false
if the token was already assigned to the given user.SomServicesWs.ServicesWSFault
- SomServicesWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomServicesWs.ErrorCodes.INVALID_USERID
if the the user id is not set.
SomServicesWs.ErrorCodes.INVALID_TOKENSNR
if the token serial number is not set.
SomServicesWs.ErrorCodes.INVALID_ACTIVATIONCODE
if the activation code is not set.
SomServicesWs.ErrorCodes.INVALID_OTP
if the format of the otp is invalid.
SomServicesWs.ErrorCodes.USER_DOES_NOT_EXIST
if the specified user does not exist.
SomServicesWs.ErrorCodes.USER_ALREADY_HAS_MAX_NUMBER_OF_TOKENS
if the user has reached the maximum number of tokens.
SomServicesWs.ErrorCodes.ACTIVATION_INCORRECT
if the activation data could not be verified.
SomServicesWs.ErrorCodes.OTP_WRONG
if the otp was incorrect.
SomServicesWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist.
SomServicesWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomServicesWs.ErrorCodes.TOKEN_WRONG_STATE
if the token state is invalid: RetryCounter exceeded, token locked, ServerPIN missing but required.
SomServicesWs.ErrorCodes.TOKEN_ALREADY_ASSIGNED_TO_USER
if the token is already assigned to another user.public boolean assignTokenToUserWithAtc(String userID, String tokenSnr, String activationData, String otp, Integer atc) throws SomServicesWs.ServicesWSFault
userID
- The unique userID for the user.tokenSnr
- The serial number of the token.activationData
- The activation data.otp
- One time password.atc
- Application transaction counter, which was used to calculate the OTP. This ATC (increased by 1) will get stored for token in case of success.true
if the token was successfully assigned to the given user. false
if the token was already assigned to the given user.SomServicesWs.ServicesWSFault
- SomServicesWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomServicesWs.ErrorCodes.INVALID_USERID
if the the user id is not set.
SomServicesWs.ErrorCodes.INVALID_TOKENSNR
if the token serial number is not set.
SomServicesWs.ErrorCodes.INVALID_ACTIVATIONCODE
if the activation code is not set.
SomServicesWs.ErrorCodes.INVALID_OTP
if the format of the otp is invalid.
SomServicesWs.ErrorCodes.USER_DOES_NOT_EXIST
if the specified user does not exist.
SomServicesWs.ErrorCodes.USER_ALREADY_HAS_MAX_NUMBER_OF_TOKENS
if the user has reached the maximum number of tokens.
SomServicesWs.ErrorCodes.ACTIVATION_INCORRECT
if the activation data could not be verified.
SomServicesWs.ErrorCodes.OTP_WRONG
if the otp was incorrect or the ATC was less than the value stored for this token in database.
SomServicesWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist.
SomServicesWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomServicesWs.ErrorCodes.TOKEN_WRONG_STATE
if the token state is invalid: RetryCounter exceeded, token locked, ServerPIN missing but required.
SomServicesWs.ErrorCodes.TOKEN_ALREADY_ASSIGNED_TO_USER
if the token is already assigned to another user.
SomServicesWs.ErrorCodes.INVALID_ATC
if the atc is out the range 0 until 65536.public byte getDeviceRTC(String userID) throws SomServicesWs.ServicesWSFault
userID
- The unique userID for the user.SomServicesWs.ServicesWSFault
- SOMErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.Copyright © 2022 KOBIL Systems GmbH. All rights reserved.