gluu
公開メンバ関数 | 公開変数類 | 非公開メンバ関数 | 全メンバ一覧
列挙 org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode 詳解
org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode 連携図
Collaboration graph

公開メンバ関数

Response getResponse ()
 

公開変数類

 SUCCESS
 
 NO_NUMBER
 
 NUMBER_ALREADY_ENROLLED
 
 UNDELIVERED
 
 DELIVERY_FAILED
 
 APP_SETUP_ERROR
 
 SMS_SERVICE_ERROR
 

非公開メンバ関数

String getEntity ()
 

詳解

All status codes are returned in a 200 (OK) HTTP response, except for the following:

著者
jgomer

関数詳解

◆ getEntity()

String org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.getEntity ( )
inlineprivate
64  {
65  return Utils.jsonFromObject(Collections.singletonMap("code", toString()));
66  }

◆ getResponse()

Response org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.getResponse ( )
inline
68  {
69 
70  Response.Status httpStatus;
71  switch (this) {
72  case NO_NUMBER:
73  httpStatus = BAD_REQUEST;
74  break;
75  case APP_SETUP_ERROR:
76  case SMS_SERVICE_ERROR:
77  case WS_SERVICE_ERROR:
78  httpStatus = INTERNAL_SERVER_ERROR;
79  break;
80  default:
81  httpStatus = OK;
82  }
83  return Response.status(httpStatus).entity(getEntity()).build();
84 
85  }

メンバ詳解

◆ APP_SETUP_ERROR

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.APP_SETUP_ERROR

The message was not delivered due to a misconfiguration in the connection with the underlying Twilio service

◆ DELIVERY_FAILED

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.DELIVERY_FAILED

The underlying Twilio API call returned a status of "failed". See Twilio status values.

◆ NO_NUMBER

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.NO_NUMBER

The API call received no phone number to send the message to

◆ NUMBER_ALREADY_ENROLLED

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.NUMBER_ALREADY_ENROLLED

The phone number supplied is already enrolled and should not receive a SMS

◆ SMS_SERVICE_ERROR

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.SMS_SERVICE_ERROR

The underlying Twilio API call threw an exception. This may happen in a variety of situations, for instance, providing a non-valid phone number (e.g 555-1234-AB)

◆ SUCCESS

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.SUCCESS

The underlying Twilio API call returned a status other than UNDELIVERED or DELIVERY_FAILED. See Twilio status values.

Recall that a success status does not guarantee the recipient actually receiving a message.

◆ UNDELIVERED

org.gluu.credmanager.plugins.authnmethod.rs.status.sms.SendCode.UNDELIVERED

The underlying Twilio API call returned a status of "undelivered". See Twilio status values.


次のファイルからこの列挙についての詳解を抽出しました: