Authorization service
A REST API towards the authorization features of the Pointsharp ID.
| API | Description |
|---|---|
Performs an authorization request for a user based on given data. |
Response codes
Any authorization request will return an HTTP 200 OK in the response header as long as the request data was in correct format and no server side related issues was enforced. However, the authorization itself is evaluated separately, and its result is seen in the authorization reply code, Code.
If the code is in a non successful state, then see the authorization error code, Error, for details of the triggered error.
Authorization reply code
A Pointsharp ID authorization reply code.
| Name | Description |
|---|---|
ACCEPT |
Code: 1. The user is authorized. |
REJECT |
Code: 2. The user is not authorized. Check the reply message for more information. |
Authorization error code
The detailed error code received from an authorization request.
| Name | Description |
|---|---|
REQ_MISSING_USERNAME |
Code: 0. The request was missing a username. |
REQ_URL_NO_DEVID |
Code: 1. The request was missing a device id in the URL. |
REQ_NO_DEVID |
Code: 2. The request was missing a device id. |
LICENSE_INVALID |
Code: 3. The Pointsharp ID license is invalid, either authorization is not enabled or in any other way expired. |
USER_LOCKED |
Code: 4. User is locked. |
USER_TIME_LOCKED |
Code: 5. User is time-locked. |
USER_DISABLED |
Code: 6. User is disabled. |
UNKNOWN_USER |
Code: 7. Unknown user. |
DEVICE_DISABLED |
Code: 8. The device is disabled. This is the default reply when the request was not authorized. The device is stored on the user, but is in a disabled state. |
DEVICE_DENIED |
Code: 9. Device is denied by configured rules. |
DEVICE_PENDING |
Code: 10. Device is in a pending state. |
DEVICE_QUARANTINE |
Code: 11. Device is in a quarantine state. |
DEVICEID_OVERFLOW |
Code: 12. The device limit is reached for this user. |
MISSING_CONFIGURATION |
Code: 13. Authorization was unable to proceed due to incorrect or missing configuration. |
POST az
Performs an authorization request for a user based on given data
Request Information
Parameters
| Name | Description | Additional information |
|---|---|---|
request |
The request data to be used for authorizing a user. |
Define this parameter in the request body. |
Parameter information
request
The request for an authorization. It contains required data used when requesting to authorize with a Pointsharp ID.
| Property | Description | Additional information |
|---|---|---|
ClientIp (String) |
Client information, IP address. |
This parameter is optional. |
Context (String) |
ActiveSync context consisting of a comma seperated name=value string. |
This parameter is optional. |
DeviceId (String) |
The device id to authorize. |
This parameter is optional. |
DeviceType (String) |
The device type to authorize. |
This parameter is optional. |
IsCacheEnabled (Boolean) |
ActiveSync client using cache. |
This parameter is optional. |
SessionData (String) |
ActiveSync session data. |
This parameter is optional. |
TransactionId (String) |
Transaction information. |
This parameter is optional. |
Url (String) |
The URL used in the request. |
This parameter is optional. |
UserAgent (String) |
The user agent of the request. |
This parameter is optional. |
Username (String) |
The username to authorize. |
This parameter is required. |
Request body formats
application/json, text/json
{
"Url": "sample string 1",
"Username": "sample string 2",
"DeviceId": "sample string 3",
"DeviceType": "sample string 4",
"UserAgent": "sample string 5",
"ClientIp": "sample string 6",
"SessionData": "sample string 7",
"Context": "sample string 8",
"IsCacheEnabled": true,
"TransactionId": "sample string 10"
}
application/xml, text/xml
<AuthorizationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Url>sample string 1</Url>
<Username>sample string 2</Username>
<DeviceId>sample string 3</DeviceId>
<DeviceType>sample string 4</DeviceType>
<UserAgent>sample string 5</UserAgent>
<ClientIp>sample string 6</ClientIp>
<SessionData>sample string 7</SessionData>
<Context>sample string 8</Context>
<IsCacheEnabled>true</IsCacheEnabled>
<TransactionId>sample string 10</TransactionId>
</AuthorizationRequest>
Response information
A reply containing information about the result of the authorization.
Response body formats
application/json, text/json
{
"Code": 1,
"Message": "sample string 2",
"SessionData": "sample string 3",
"Context": "sample string 4",
"Error": 5,
"Policy": 6,
"UserAgent": "sample string 7",
"SubjectMustInclude": "sample string 8",
"SubjectMustNotInclude": "sample string 9",
"SubjectMustIncludeAttachment": "sample string 10",
"SubjectMustNotIncludeAttachment": "sample string 11",
"SubjectPrefix": "sample string 12",
"SubjectSuffix": "sample string 13",
"AttachmentFilters": "sample string 14",
"MessageClassFilters": "sample string 15",
"SubjectMustIncludeBody": "sample string 16",
"SubjectMustNotIncludeBody": "sample string 17",
"BodyBlockText": "sample string 18",
"NewContentSubjectPrefix": "sample string 19",
"NewContentSubjectSuffix": "sample string 20",
"NewContentBodyPrefixTextPlain": "sample string 21",
"NewContentBodyPrefixTextHtml": "sample string 22",
"TruncationBodySize": 23,
"EthicalWallRules": "sample string 24",
"SyncKeyPrefix": 25,
"WBXMLTokenUpdate": {
"$type": "System.Collections.Generic.List`1[[PointSharp.WebServices.Models.Authorization.WBXMLToken, PointSharp.WebServices.Models]], mscorlib",
"$values": [
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLToken, PointSharp.WebServices.Models",
"CP": 64,
"Id": 64,
"Flags": 64,
"Par": {
"$type": "System.Collections.Generic.List`1[[PointSharp.WebServices.Models.Authorization.WBXMLsid, PointSharp.WebServices.Models]], mscorlib",
"$values": [
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLsid, PointSharp.WebServices.Models",
"Schema": 1,
"CP": 64,
"Id": 64,
"CP1": 64,
"Id1": 64
},
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLsid, PointSharp.WebServices.Models",
"Schema": 1,
"CP": 64,
"Id": 64,
"CP1": 64,
"Id1": 64
}
]
},
"tRule": {
"$type": "System.Collections.Generic.List`1[[PointSharp.WebServices.Models.Authorization.WBXMLtrule, PointSharp.WebServices.Models]], mscorlib",
"$values": [
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLtrule, PointSharp.WebServices.Models",
"con": 0,
"Value": "sample string 1",
"action": 0,
"Truncate": "sample string 2"
},
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLtrule, PointSharp.WebServices.Models",
"con": 0,
"Value": "sample string 1",
"action": 0,
"Truncate": "sample string 2"
}
]
}
},
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLToken, PointSharp.WebServices.Models",
"CP": 64,
"Id": 64,
"Flags": 64,
"Par": {
"$type": "System.Collections.Generic.List`1[[PointSharp.WebServices.Models.Authorization.WBXMLsid, PointSharp.WebServices.Models]], mscorlib",
"$values": [
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLsid, PointSharp.WebServices.Models",
"Schema": 1,
"CP": 64,
"Id": 64,
"CP1": 64,
"Id1": 64
},
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLsid, PointSharp.WebServices.Models",
"Schema": 1,
"CP": 64,
"Id": 64,
"CP1": 64,
"Id1": 64
}
]
},
"tRule": {
"$type": "System.Collections.Generic.List`1[[PointSharp.WebServices.Models.Authorization.WBXMLtrule, PointSharp.WebServices.Models]], mscorlib",
"$values": [
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLtrule, PointSharp.WebServices.Models",
"con": 0,
"Value": "sample string 1",
"action": 0,
"Truncate": "sample string 2"
},
{
"$type": "PointSharp.WebServices.Models.Authorization.WBXMLtrule, PointSharp.WebServices.Models",
"con": 0,
"Value": "sample string 1",
"action": 0,
"Truncate": "sample string 2"
}
]
}
}
]
},
"WBXMLSchemaBlockIfMissing": true,
"MailHeaderRules": {
"$type": "System.Collections.Generic.List`1[[PointSharp.WebServices.Models.Authorization.ActiveSyncMailHeaderRule, PointSharp.WebServices.Models]], mscorlib",
"$values": [
{
"$type": "PointSharp.WebServices.Models.Authorization.ActiveSyncMailHeaderRule, PointSharp.WebServices.Models",
"Header": "sample string 1",
"Value": "sample string 2",
"Flags": 3
},
{
"$type": "PointSharp.WebServices.Models.Authorization.ActiveSyncMailHeaderRule, PointSharp.WebServices.Models",
"Header": "sample string 1",
"Value": "sample string 2",
"Flags": 3
}
]
},
"WindowsSize": 27,
"MIMETruncation": 28
}
application/xml, text/xml
<AuthorizationReply xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Code>1</Code>
<Message>sample string 2</Message>
<SessionData>sample string 3</SessionData>
<Context>sample string 4</Context>
<Error>5</Error>
<Policy>6</Policy>
<UserAgent>sample string 7</UserAgent>
<SubjectMustInclude>sample string 8</SubjectMustInclude>
<SubjectMustNotInclude>sample string 9</SubjectMustNotInclude>
<SubjectMustIncludeAttachment>sample string 10</SubjectMustIncludeAttachment>
<SubjectMustNotIncludeAttachment>sample string 11</SubjectMustNotIncludeAttachment>
<SubjectPrefix>sample string 12</SubjectPrefix>
<SubjectSuffix>sample string 13</SubjectSuffix>
<AttachmentFilters>sample string 14</AttachmentFilters>
<MessageClassFilters>sample string 15</MessageClassFilters>
<SubjectMustIncludeBody>sample string 16</SubjectMustIncludeBody>
<SubjectMustNotIncludeBody>sample string 17</SubjectMustNotIncludeBody>
<BodyBlockText>sample string 18</BodyBlockText>
<NewContentSubjectPrefix>sample string 19</NewContentSubjectPrefix>
<NewContentSubjectSuffix>sample string 20</NewContentSubjectSuffix>
<NewContentBodyPrefixTextPlain>sample string 21</NewContentBodyPrefixTextPlain>
<NewContentBodyPrefixTextHtml>sample string 22</NewContentBodyPrefixTextHtml>
<TruncationBodySize>23</TruncationBodySize>
<EthicalWallRules>sample string 24</EthicalWallRules>
<SyncKeyPrefix>25</SyncKeyPrefix>
<WBXMLTokenUpdate>
<WBXMLToken>
<CP>64</CP>
<Id>64</Id>
<Flags>64</Flags>
<Par>
<WBXMLsid>
<Schema>1</Schema>
<CP>64</CP>
<Id>64</Id>
<CP1>64</CP1>
<Id1>64</Id1>
</WBXMLsid>
<WBXMLsid>
<Schema>1</Schema>
<CP>64</CP>
<Id>64</Id>
<CP1>64</CP1>
<Id1>64</Id1>
</WBXMLsid>
</Par>
<tRule>
<WBXMLtrule>
<con>MustInclude</con>
<Value>sample string 1</Value>
<action>None</action>
<Truncate>sample string 2</Truncate>
</WBXMLtrule>
<WBXMLtrule>
<con>MustInclude</con>
<Value>sample string 1</Value>
<action>None</action>
<Truncate>sample string 2</Truncate>
</WBXMLtrule>
</tRule>
</WBXMLToken>
<WBXMLToken>
<CP>64</CP>
<Id>64</Id>
<Flags>64</Flags>
<Par>
<WBXMLsid>
<Schema>1</Schema>
<CP>64</CP>
<Id>64</Id>
<CP1>64</CP1>
<Id1>64</Id1>
</WBXMLsid>
<WBXMLsid>
<Schema>1</Schema>
<CP>64</CP>
<Id>64</Id>
<CP1>64</CP1>
<Id1>64</Id1>
</WBXMLsid>
</Par>
<tRule>
<WBXMLtrule>
<con>MustInclude</con>
<Value>sample string 1</Value>
<action>None</action>
<Truncate>sample string 2</Truncate>
</WBXMLtrule>
<WBXMLtrule>
<con>MustInclude</con>
<Value>sample string 1</Value>
<action>None</action>
<Truncate>sample string 2</Truncate>
</WBXMLtrule>
</tRule>
</WBXMLToken>
</WBXMLTokenUpdate>
<WBXMLSchemaBlockIfMissing>true</WBXMLSchemaBlockIfMissing>
<MailHeaderRules>
<ActiveSyncMailHeaderRule>
<Header>sample string 1</Header>
<Value>sample string 2</Value>
<Flags>3</Flags>
</ActiveSyncMailHeaderRule>
<ActiveSyncMailHeaderRule>
<Header>sample string 1</Header>
<Value>sample string 2</Value>
<Flags>3</Flags>
</ActiveSyncMailHeaderRule>
</MailHeaderRules>
<WindowsSize>27</WindowsSize>
<MIMETruncation>28</MIMETruncation>
</AuthorizationReply>