Search Results for

    Show / Hide Table of Contents

    Method LogonWithToken

    LogonWithToken(String, String, String, String, Int32)

    Logon to server with a token

    Declaration
    LogonResultContract LogonWithToken(string tenantName, string token, string tokenType, string clientId, int timeZoneOffsetMinutes)
    Parameters
    Type Name Description
    System.String tenantName

    Optional: Tenant name to logon to. See also GetAllTenantNames()

    System.String token

    Token with logon credentials

    System.String tokenType

    Token type. "InfoShareToken" or the id of the profile to use. See also GetTokenSettings(String)

    System.String clientId

    Optional: The unique identifier of the client program used for licence validation. Default: null

    System.Int32 timeZoneOffsetMinutes

    Deprecated: The offset in minutes between client time zone and UTC. Should not longer be used. Default value 0.

    Returns
    Type Description
    LogonResultContract

    Return the logon result with the connection id

    Remarks
    • Connection will be automatically closed after the defined idle timeout (default: 10 minutes). See also ConnectionTimeoutSeconds
    • InfoShareToken uses certificates installed in the Windows server certificate store system\personal to verify tokens.
    Examples

    POST https://YourServerName/InfoShare/Json/Authentication/LogonWithToken

    Example for a login with a external token.

    {
       "tenantName": "DCIS_KENDOX",
       "token": "eyJ0eXAiOiJKV1QiLCJub25jZSI6IkJMdTFXb2N0UzZKdkVpbGgzdFZtc2s0ckl0cG42QmliQVZXRE1aZE5WeTAiLCJhbGciOiJSUzI1NiIsIng1dCI6InU0T2ZORlBId0VCb3NIanRyYXVPYlY4NExuWSIsImtpZCI6InU0T2ZORlBId0VCb3NIanRyYXVPYlY4NExuWSJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLm1pY3Jvc29mdC5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8xN2UwMjUyYS1jOTQ2LTQ5YzMtYjE4Yi00NjA5ZjFlNDE0MGQvIiwiaWF0IjoxNTY1NzczNjI3LCJuYmYiOjE1NjU3NzM2MjcsImV4cCI6MTU2NTc3NzUyNywiYWNjdCI6MCwiYWNyIjoiMSIsImFpbyI6IjQyRmdZSmlackxySy9JZjI2azhISWtXZlJiMVRDYmhqNUJhalpqWnJhc2RDRzdmUFBqb0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GFDHgwmQn5pwNJOTfk-eSsCL60WyP7BsypUjPAMWhNFcWislUg9X7qjy7JRKqJzpGXZgp2CTk0USZrwuJV_HocLqFOK5MzRoxNXl9SmSHM5qHZwRzvBC47y0F8wTWGDY8jFUbsvR1J5w",
       "tokenType": "BE38C39F-E32F-4EF3-AAA6-D5331624D4A6"
    }

    Response:

    {
       "LogonWithToken": {
         "ConnectionId": "6bc655a4-c079-4535-a733-f259e3232a3a",
         "ConnectionTimeoutSeconds": 600,
         "IsApplicationLicence": false,
         "IsConcurrentLicence": true,
         "IsNamedLicence": false,
         "IsVerificationCodeNeeded": false,
         "PossibleTwoWayAuthenticationType": "None",
         "TwoWayAuthenticationTargetMail": null,
         "JWTToken": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8...." }
    }

    Example for a login with a api token.

    {
       "tenantName": "DCIS_KENDOX",
       "token": "eyJ0eXAiOiJKV1QiLCJub25jZSI6IkJMdTFXb2N0UzZKdkVpbGgzdFZtc2s0ckl0cG42QmliQVZXRE1aZE5WeTAiLCJhbGciOiJSUzI1NiIsIng1dCI6InU0T2ZORlBId0VCb3NIanRyYXVPYlY4NExuWSIsImtpZCI6InU0T2ZORlBId0VCb3NIanRyYXVPYlY4NExuWSJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLm1pY3Jvc29mdC5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8xN2UwMjUyYS1jOTQ2LTQ5YzMtYjE4Yi00NjA5ZjFlNDE0MGQvIiwiaWF0IjoxNTY1NzczNjI3LCJuYmYiOjE1NjU3NzM2MjcsImV4cCI6MTU2NTc3NzUyNywiYWNjdCI6MCwiYWNyIjoiMSIsImFpbyI6IjQyRmdZSmlackxySy9JZjI2azhISWtXZlJiMVRDYmhqNUJhalpqWnJhc2RDRzdmUFBqb0EiLCJhbXIiOlsicHdkIl0sImFwcF9kaXNwbGF5bmFtZSI6IlRlc3RBcHBXRUwiLCJhcHBpZCI6IjU5OWFkNW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FOK5MzRoxNXl9SmSHM5qHZwRzvBC47y0F8wTWGDY8jFUbsvR1J5w",
       "tokenType": "apitoken"
    }

    Response:

    {
       "LogonWithToken": {
         "AbsenceInfo": {
           "AbsenceDateEnd": "",
           "AbsenceDateStart": "",
           "Absent": false,
           "DeputyRepresentativeUserId": null },
         "ConnectionId": "6bc655a4-c079-4535-a733-f259e3232a3a",
         "ConnectionTimeoutSeconds": 600,
         "IsApplicationLicence": false,
         "IsConcurrentLicence": true,
         "IsNamedLicence": false,
         "IsVerificationCodeNeeded": false,
         "PossibleTwoWayAuthenticationType": "None",
         "TwoWayAuthenticationTargetMail": null,
         "JWTToken": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8...." }
    }
    Exceptions
    Type Condition
    ServiceException

    Can not login (10006)

    ServiceException

    Tenant not found {tenantName} (10038)

    ServiceException

    Too much sessions for user {userName} (10055)

    ServiceException

    No more licences available for the user {userName} (10056)

    ServiceException

    Named user licence not available {userName} (10057)

    ServiceException

    Token type unknown: {tokenType} (10060)

    ServiceException

    Wrong token version: {tokenVersion} (10061)

    ServiceException

    Sender time stamp differs more than 1 minute! (10062)

    ServiceException

    Life time ({lifeTimeSeconds}) for token reached. (10063)

    ServiceException

    Unknown hash algorithm found: {hashAlgorithm} (10064)

    ServiceException

    Signature of token not valid! (10065)

    ServiceException

    Wrong client Id parameter (10089)

    ServiceException

    Missing feature in server license {featureId} (10100)

    ServiceException

    User {userName} is deactivated

    ServiceException

    Invalid ip address for user: '{userName}' (10222)

    ServiceException

    This GetOAuthToken method is to throw WebException: {exceptionMessage} (10246)

    ServiceException

    JWT Token UPN Identifier: {UPNAttributeName} not found (10244)

    ServiceException

    Api token is not valid (10268)

    ServiceException

    No interactive login with application user licence allowed (10285)

    ServiceException

    Token not valid. (10376)

    Back to top Copyright © Kendox