|
1 | 1 | /* |
2 | | - * Copyright 2021 Swisscom (Schweiz) AG |
| 2 | + * Copyright 2021-2025 Swisscom (Schweiz) AG |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
15 | 15 | */ |
16 | 16 | package ch.swisscom.mid.client.model; |
17 | 17 |
|
| 18 | +import ch.swisscom.mid.client.impl.Loggers; |
18 | 19 | import org.slf4j.Logger; |
19 | 20 | import org.slf4j.LoggerFactory; |
20 | 21 |
|
21 | | -import ch.swisscom.mid.client.impl.Loggers; |
22 | | - |
23 | 22 | public enum StatusCode implements DocumentedEnum { |
24 | 23 |
|
25 | 24 | REQUEST_OK(100, false, "The request from the AP has been accepted."), |
26 | 25 | WRONG_PARAM(101, true, "The AP’s request contains wrong parameters."), |
27 | 26 | MISSING_PARAM(102, true, "The AP’s request has missing parameters."), |
28 | 27 | WRONG_DATA_LENGTH(103, true, "The AP’s request contains a DTBD message " |
29 | | - + "that is exceeding the max. allowed length."), |
| 28 | + + "that is exceeding the max. allowed length."), |
30 | 29 | UNAUTHORIZED_ACCESS(104, true, "AP is not authorized to access the Mobile ID API. " |
31 | | - + "This is typically due to a wrong AP_ID value or missing X509 client certificate."), |
| 30 | + + "This is typically due to a wrong AP_ID value or missing X509 client certificate."), |
32 | 31 | UNKNOWN_CLIENT(105, true, "The MSISDN value is unknown to the MID service. " |
33 | | - + "There is no Mobile ID user with that MSISDN value."), |
| 32 | + + "There is no Mobile ID user with that MSISDN value."), |
34 | 33 | INAPPROPRIATE_DATA(107, true, "The AP’s request was not accepted due to inappropriate data. " |
35 | | - + "Typically, the DTBD message does not contain the mandatory prefix string " |
36 | | - + "(see section 2.19 of the Reference Guide) that is a unique string for each AP."), |
| 34 | + + "Typically, the DTBD message does not contain the mandatory prefix string " |
| 35 | + + "(see section 2.19 of the Reference Guide) that is a unique string for each AP."), |
37 | 36 | INCOMPATIBLE_INTERFACE(108, true, "The AP’s request contains bad data. " |
38 | | - + "Typically, a wrong MajorVersion or MinorVersion value has been set in the request."), |
| 37 | + + "Typically, a wrong MajorVersion or MinorVersion value has been set in the request."), |
39 | 38 | UNSUPPORTED_PROFILE(109, true, "Either the AP has specified an MSS signature profile value " |
40 | | - + "that the MSSP does not support or the AP is not authorized to use the " |
41 | | - + "Signature Profile. See section 3.2.1 of the Reference Guide."), |
| 39 | + + "that the MSSP does not support or the AP is not authorized to use the " |
| 40 | + + "Signature Profile. See section 3.2.1 of the Reference Guide."), |
42 | 41 | EXPIRED_TRANSACTION(208, true, "The transaction timed out. The AP may try again."), |
43 | 42 | OTA_ERROR(209, true, "A Problem related to the MSSP internal Over-The-Air (OTA) communication " |
44 | | - + "with the Mobile ID user’s SIM. " |
45 | | - + "Typically, there is a temporary problem with SMS communication."), |
| 43 | + + "with the Mobile ID user’s SIM. " |
| 44 | + + "Typically, there is a temporary problem with SMS communication."), |
46 | 45 | USER_CANCEL(401, true, "The user cancelled the request at the mobile phone."), |
47 | 46 | PIN_NR_BLOCKED(402, true, "The Mobile ID PIN of the SIM method is blocked. " |
48 | | - + "The user must reactivate the Mobile ID SIM card on the Mobile ID selfcare portal."), |
| 47 | + + "The user must reactivate the Mobile ID SIM card on the Mobile ID selfcare portal."), |
49 | 48 | CARD_BLOCKED(403, true, "The Mobile ID user is currently suspended. " |
50 | | - + "Please contact Swisscom Support."), |
| 49 | + + "Please contact Swisscom Support."), |
51 | 50 | NO_KEY_FOUND(404, true, "The Mobile ID user exists but is not in an active state. " |
52 | | - + "The user must activate the account on the Mobile ID selfcare portal."), |
| 51 | + + "The user must activate the account on the Mobile ID selfcare portal."), |
53 | 52 | PB_SIGNATURE_PROCESS(406, true, "A signature transaction is already on-going. " |
54 | | - + "Please try again later."), |
| 53 | + + "Please try again later."), |
55 | 54 | NO_CERT_FOUND(422, true, "The Mobile ID user exists but is not in an active state. " |
56 | | - + "The user must activate the account on the Mobile ID selfcare portal."), |
| 55 | + + "The user must activate the account on the Mobile ID selfcare portal."), |
| 56 | + GEOFENCING_POLICY_VIOLATION(450, true, "Geo policy for referenced AP ID was violated. " |
| 57 | + + "Please try again later or contact Swisscom Support, if the problem persists."), |
57 | 58 | SIGNATURE(500, false, "The MSS Signature transaction was successful."), |
58 | 59 | REVOKED_CERTIFICATE(501, false, "The Mobile ID user’s509 certificate has been revoked. " |
59 | | - + "The user must re-activate the account on the Mobile ID selfcare portal."), |
| 60 | + + "The user must re-activate the account on the Mobile ID selfcare portal."), |
60 | 61 | VALID_SIGNATURE(502, false, "The MSS Signature transaction was successful."), |
61 | 62 | INVALID_SIGNATURE(503, false, "The MSS Signature transaction failed due to invalid signature data. " |
62 | | - + "The user must re-activate the account on the Mobile ID selfcare portal."), |
| 63 | + + "The user must re-activate the account on the Mobile ID selfcare portal."), |
63 | 64 | OUTSTANDING_TRANSACTION(504, false, "The MSS Signature transaction is outstanding. " |
64 | | - + "The AP must try again later."), |
| 65 | + + "The AP must try again later."), |
65 | 66 | CONNECTION_REFUSED(780, true, "The connection to the service was refused. " |
66 | | - + "The client did not present a valid TLS certificate"), |
| 67 | + + "The client did not present a valid TLS certificate"), |
67 | 68 | INTERNAL_ERROR(900, true, "An internal error on MSSP has occurred. " |
68 | | - + "Please try again later or contact Swisscom Support, if the problem persists."); |
| 69 | + + "Please try again later or contact Swisscom Support, if the problem persists."); |
69 | 70 |
|
70 | 71 | private static final Logger log = LoggerFactory.getLogger(Loggers.CLIENT); |
71 | 72 |
|
|
0 commit comments