Cidaas Free signup

  • Improved the performance of the cidaas free signup process

API changes

Well-known Openid Configuration

V1 API V2 API
https://base-path.cidaas.de/oauth2-login/.well-known/openid-configuration

{
  "issuer": "https://base-path.cidaas.de",
  "authorization_endpoint": "https://base-path.cidaas.de/oauth2-login/oauth2/authz",
  "token_endpoint": "https://base-path.cidaas.de/oauth2-login/oauth2/token",
  "token_verify_endpoint": "https://base-path.cidaas.de/oauth2-login/oauth2/checktoken",
  "userinfo_endpoint": "https://base-path.cidaas.de/oauth2-usermanagement/oauth2/userinfo",
  "logout_endpoint": "https://base-path.cidaas.de/oauth2-usermanagement/oauth2/logout",
  "response_types_supported": [
    "code",
    "token"
  ],
  "scopes_supported": [
    "cidaas:usercreate",
    "cidaas:userupdate",
    "cidaas:userinfo",
    "cidaas:verifyemail",
    "cidaas:activate",
    "cidaas:deactivate",
    "cidaas:deleteuser"
  ],
  "id_token_signing_alg_values_supported": [
    "RS256"
  ],
  "token_endpoint_auth_methods_supported": [
    "client_secret_post",
    "client_secret_basic"
  ],
  "code_challenge_methods_supported": [
    "plain",
    "S256"
  ],
  "subject_types_supported": [
    "public"
  ]
}
https://base-path.cidaas.de/.well-known/openid-configuration

{
  "issuer": "https://base-path.cidaas.de",
  "userinfo_endpoint": "https://base-path.cidaas.de/users-srv/userinfo",
  "authorization_endpoint": "https://base-path.cidaas.de/authz-srv/authz",
  "introspection_endpoint": "https://base-path.cidaas.de/token-srv/introspect",
  "revocation_endpoint": "https://base-path.cidaas.de/token-srv/revoke",
  "token_endpoint": "https://base-path.cidaas.de/token-srv/token",
  "jwks_uri": "https://base-path.cidaas.de/.well-known/jwks.json",
  "check_session_iframe": "https://base-path.cidaas.de/session/check_session",
  "end_session_endpoint": "https://base-path.cidaas.de/session/end_session",
  "subject_types_supported": [
    "public"
  ],
  "scopes_supported": [
    "openid",
    "profile",
    "email",
    "phone",
    "address",
    "offline_access",
    "identities",
    "roles",
    "groups"
  ],
  "response_types_supported": [
    "code",
    "token",
    "id_token",
    "code token",
    "code id_token",
    "token id_token",
    "code token id_token"
  ],
  "response_modes_supported": [
    "query",
    "fragment",
    "form_post"
  ],
  "grant_types_supported": [
    "implicit",
    "authorization_code",
    "refresh_token",
    "password",
    "client_credentials"
  ],
  "id_token_signing_alg_values_supported": [
    "HS256",
    "RS256"
  ],
  "id_token_encryption_alg_values_supported": [
    "RS256"
  ],
  "id_token_encryption_enc_values_supported": [
    "A128CBC-HS256"
  ],
  "userinfo_signing_alg_values_supported": [
    "HS256",
    "RS256"
  ],
  "userinfo_encryption_alg_values_supported": [
    "RS256"
  ],
  "userinfo_encryption_enc_values_supported": [
    "A128CBC-HS256"
  ],
  "request_object_signing_alg_values_supported": [
    "HS256",
    "RS256"
  ],
  "request_object_encryption_alg_values_supported": [
    "RS256"
  ],
  "request_object_encryption_enc_values_supported": [
    "A128CBC-HS256"
  ],
  "token_endpoint_auth_methods_supported": [
    "client_secret_basic",
    "client_secret_post",
    "client_secret_jwt",
    "private_key_jwt"
  ],
  "token_endpoint_auth_signing_alg_values_supported": [
    "HS256",
    "RS256"
  ],
  "claims_supported": [
    "aud",
    "auth_time",
    "created_at",
    "email",
    "email_verified",
    "exp",
    "family_name",
    "given_name",
    "iat",
    "identities",
    "iss",
    "mobile_number",
    "name",
    "nickname",
    "phone_number",
    "picture",
    "sub"
  ],
  "claims_parameter_supported": false,
  "claim_types_supported": [
    "normal"
  ],
  "service_documentation": "https://docs.cidaas.de/",
  "claims_locales_supported": [
    "en-US"
  ],
  "ui_locales_supported": [
    "en-US",
    "de-DE"
  ],
  "display_values_supported": [
    "page",
    "popup"
  ],
  "code_challenge_methods_supported": [
    "plain",
    "S256"
  ],
  "request_parameter_supported": true,
  "request_uri_parameter_supported": true,
  "require_request_uri_registration": false,
  "op_policy_uri": "https://www.cidaas.com/privacy-policy/",
  "op_tos_uri": "https://www.cidaas.com/terms-of-use/"
}

Authz URL Generation

V1 V2
https://base-path.cidaas.de/oauth2-login/oauth2/authz?client_id=&redirect_uri=&viewtype=NaN&reponse_type=NaN`
or
https://base-path.cidaas.de/oauth2-login/oauth2/authz?client_id=&redirect_uri=&grant_type=NaN&reponse_type=NaN
https://base-path.cidaas.de/authz-srv/authz?client_id=&redirect_uri=&view_type=NaN

Changes:

Query Params:
  • `viewtype` is changed to `view_type`
  • `grant_type` is removed
  • For the token request `nonce` params is required.
Query Params value:
  • In `view_type` only `login` and `register` is supported, `password` option is removed

Scopes

Changes

Scope Keys

  • `cidaas:read` changed to `cidaas:admin_read`
  • `cidaas:write` changed to `cidaas:admin_write`
  • `cidaas:delete` changed to `cidaas:admin_delete`
  • cidaas:code `removed`
  • cidaas:login `removed`
  • cidaas:usercreate `removed`
  • cidaas:userupdate `removed`
  • cidaas:userinfo `removed`, need add the specific scope to get the access , example `profile`, `email`, `phone`, `address`, `roles`, `groups`, `identities`
  • cidaas:verifyemail `removed`
  • cidaas:activate `removed`
  • cidaas:deactivate `removed`
  • cidaas:deleteuser `removed`
  • cidaas:group-read `removed`
  • cidaas:group-write `removed`
To Know more about New Scopes and Usage please visit: [scopes](/manage-applications/scope-management.md)

Scope Requesting behaviour

In cidaas v1 if no scopes where asked , cidaas was considered that as All scope requested. Ie, it will take all the scopes from the app and gives access in the access_token In cidaas v2 if no scopes where asked , cidaas will considered that as `No scope requested.` This will be `breaking changes for the cidaas v1 users` , please request the relevant scopes in the authz request.

V2

`https://base-path.cidaas.de/authz-srv/authz?client_id=&redirect_uri=&view_type=NaN`

Changes

Access Token Payload

V1 V2
{
  "sid": "efe26735-938e-44e8-b7d6-f03385ce45d5",
  "sub": "db8492d1-0b6b-4a72-93fe-ade26660d0c8",
  "isub": "f081d8f6-ddb7-4eb5-9181-051783b75ae0",
  "aud": "378abf89-f861-41d9-a7f6-0b38d22fbf98",
  "iat": 1528200400,
  "auth_time": 1528200400,
  "iss": "https://base-url.cidaas.de",
  "jti": "c02a69fd-99d2-44b5-b622-72271d2edeb7",
  "scopes": [
    "openid",
    "profile",
    "email",
    "phone"
  ],
  "roles": [
    "USER",
    "SECONDARY_ADMIN"
  ],
  "role": "USER,SECONDARY_ADMIN",
  "clientid": "378abf89-f861-41d9-a7f6-0b38d22fbf98",
  "exp": 1528286800612,
  "scope": "openid profile email phone"
}
{
  "sid": "c4c2b938-ce32-4c1f-9bb7-4e505021c5d8",
  "sub": "db8492d1-0b6b-4a72-93fe-ade26660d0c8",
  "isub": "f081d8f6-ddb7-4eb5-9181-051783b75ae0",
  "aud": "378abf89-f861-41d9-a7f6-0b38d22fbf98",
  "iat": 1528200569,
  "auth_time": 1528200569,
  "iss": "https://base-path.cidaas.de",
  "jti": "8614a9d7-061f-4509-95bf-ee1d316dbe5c",
  "scopes": [
    "openid",
    "profile",
    "email",
    "phone"
  ],
  "roles": [
    "USER"
  ],
  "exp": 1528286969
}

Changes

  • `exp` is change `milliseconds` to `seconds`
  • `role` string variable is removed, use the `roles` array instead.
  • `scope` string variable is removed, use the `scopes` array instead.
If you are using the Cidaas Interceptor. `oauth2-interceptor:1.2.2` or lower

    de.cidaas
    oauth2-interceptor
    1.2.2


    de.carbook
    oauth2-interceptor
    ...

Need to change the depetancy to `cidaas-interceptor-java:1.0.3`

    de.cidaas
    cidaas-interceptor-java
    1.0.3

Find the latest interceptor here : http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22cidaas-interceptor-java%22

Authentication

Token Generation

V1 V2
curl -X POST \
  https://base-path.cidaas.de/oauth2-login/oauth2/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=password&
  client_id=c4364c44-ddda-4552-9fbc-d1281d9ad351&

  client_secret=ec1f8c8b-99a8-4ea0-a7c7-93b9b72b9e6f&

  username=developer%40cidaas.de&password=test123'
Response:
{
    "user_id": "db8492d1-0b6b-4a72-93fe-ade26660d0c8",
    "expires_in": 86400,
    "userstate": "KNOWN",
    "scope":"cidaas:read",
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM5MzRhYmNh*****"
}
curl -X POST \
  https://base-path.cidaas.de/token-srv/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=password&client_id=378abf89-f861-41d9-a7f6-0b38d22fbf98&client_secret=b49dc366-2f24-4bda-8407-3fdf52730f5d&username=developer%40cidaas.de&password=test123&scope=openid%20profile%20email%20phone'
Response:
{
    "sub": "db8492d1-0b6b-4a72-93fe-ade26660d0c8",
    "token_type": "Bearer",
    "expires_in": 86400,
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZ******",
    "id_token": "eyJhbGciOiImtpZCI6IjJSUzI1NiI******"
}

Changes

  • `userId` is changed to `sub`
  • `token_type` added
  • `userstate` is removed.
  • start to honour the `scope` request parameter
  • `scope` is removed, it is embeded in the token itself.
And we have full support of openid connect , Please check this docs for the standard endpoints

Introspect token or Check token

V1 V2
curl -X GET \
  https://base-path.cidaas.de/oauth2-login/oauth2/checktoken \
  -H 'access_token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwMjM2ZWZiLWR........'
Response:
true/false
curl -X POST \
  https://base-path.cidaas.de/token-srv/introspect \
  -H 'Authorization: Basic NWVmNDFmNTEtOTY4ZC0***==' \
  -H 'Content-Type: application/json' \
  -d '{
    "token":"eyJhbGciOiJSUzI1NiIsImtpZ******",
    "token_type_hint":"access_token"
}
Check more options: Introspect Token

Validating the Roles against the Token / Matching Roles

V1 V2
curl -X GET \
  'https://base-path.cidaas.de/oauth2-login/oauth2/userroles/matchingroles?roles=HCBTEST' \
  -H 'access_token: eyJhbGciOiJSUzI1NiIsI*****'
`Removed` the api becuase the role details are embeded in the token.

User Info

V1 V2
curl -X GET \
  https://base-path.cidaas.de/oauth2-usermanagement/oauth2/userinfo \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: 41705af6-35c6-4b68-950f-87f4c60666db' \
  -H 'access_token: eyJhbGciOiJSUzI1N******'
Response:
{
    "id": "f081d8f6-ddb7-4eb5-9181-051783b75ae0",
    "username": "developer@cidaas.de",
    "email": "developer@cidaas.de",
    "active": true,
    "createTime": 1519849867847,
    "currentLocale": "en-us",
    "displayName": "cidaas developer",
    "emailVerified": true,
    "firstname": "cidaas",
    "lastname": "developer",
    "lastUsedSocialIdentity": "f081d8f6-ddb7-4eb5-9181-051783b75ae0",
    "mobile": "+919738122401",
    "mobileNoVerified": true,
    "photoURL": "https://base-path.cidaas.de/profile/db8492d1-0b6b-4a72-93fe",
    "provider": "SELF",
    "roles": [
        "USER"
    ],
    "ssoId": "db8492d1-0b6b-4a72-93fe-ade26660d0c8",
    "userStatus": "VERIFIED",
    "lastLoggedTime": 1528221924055,
    "customFieldWithMetadata": {
        "birth date": {
            "dataType": "DATE",
            "value": "2018-03-14",
            "internal": false,
            "readOnly": false,
            "key": "birth date"
        },
        "gender": {
            "dataType": "SELECT",
            "value": "Male",
            "internal": false,
            "readOnly": false,
            "key": "gender"
        },
        "test": {
            "dataType": "MULTISELECT",
            "value": "",
            "internal": false,
            "readOnly": false,
            "key": "test"
        }
    },
    "customFields": {
        "birth date": "2018-03-14",
        "gender": "Male",
        "test": ""
    },
    "groups": {
        "CIDAAS_ADMINS": "SECONDARY_ADMIN"
    },
    "groupInfo": [
        {
            "groupId": "CIDAAS_ADMINS",
            "path": "/CIDAAS_ADMINS/",
            "roles": [
                "SECONDARY_ADMIN"
            ]
        }
    ]
}

Entity:

import { UserGroupInfo_v1 } from "./UserGroupInfo_v1";
export class UserInfo_v1 {
    id?: string;
    // affected in create and update
    provider?: string;
    /**
     * Ueber die ssoId wird die Verknuepfung zum {@link UserAccount}
     * hergestellt.
     */
    ssoId?: string;
    // affected in create and update
    username?: string;
    email?: string;
    mobile?: string;
    // affected in create and update
    firstname?: string;
    // affected in create and update
    lastname?: string;
    // affected in create and update
    displayName?: string;
    createTime?: Number;
    // affected in create and update
    active?: boolean;
    emailVerified?: boolean;
    mobileNoVerified?: boolean;
    smsNotificationEnabled?: boolean;
    googleAuthenticatorEnabled?: boolean;
    currentLocale?: string;
    // affected in create and update
    userStatus?: string;
    identityJRString?: string;
    // affected in create and update
    customFields: any;
    // affected in create and update
    roles?: string[];
    // affected in create and update
    twofactorenabled?: boolean;
    lastLoggedTime?: number;
    lastUsedSocialIdentity?: string;
    photoURL?: string;
    usedProviders?: string[];
    customFieldWithMetadata: any;
    groups?: string[];
    groupInfo?: UserGroupInfo_v1[];
}
export class UserGroupInfo_v1 {
    groupId?: string;
    groupType?: string;
    path?: string;
    roles?: string[];
}
curl -X POST \
  https://base-path.cidaas.de/users-srv/userinfo \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6I.......' \
  -H 'Content-Type: application/x-www-form-urlencoded'
Response:
{
    "sub": "db8492d1-0b6b-4a72-93fe-ade26660d0c8",
    "name": "cidaas developer",
    "family_name": "developer",
    "given_name": "cidaas",
    "middle_name": "developer",
    "nickname": "cidaas",
    "preferred_username": "developer@cidaas.de",
    "profile": "https://base-path.cidaas.de/profile/db8492d1-0b6b-4a72-93fe-ade26660d0c8-f081d8f6-ddb7-4eb5-9181-051783b75ae0",
    "picture": "https://base-path.cidaas.de/profile/db8492d1-0b6b-4a72-93fe-ade26660d0c8-f081d8f6-ddb7-4eb5-9181-051783b75ae0",
    "website": "https://cidaas.com",
    "gender": "male",
    "birthdate": "2018-03-14",
    "zoneinfo": "Europe/Paris",
    "locale": "en-us",
    "updated_at": 1525588569,
    "email": "developer@cidaas.de",
    "email_verified": true,
    "phone_number": "+919738122401",
    "phone_number_verified": true,
    "mobile_number": "+919738122401",
    "mobile_number_verified": true
}

Entity

import { UserGroupMap } from "./UserGroupMap";
import { AddressEntity } from "./AddressEntity";
import { Identities } from "./Identities";

export class UserEntity {
    userStatus: string = "";
    username: string = "";
    sub: string = "";
    name: string = "";
    given_name: string = "";
    family_name: string = "";
    middle_name: string = "";
    nickname: string = "";
    email: string = "";
    email_verified: boolean = false;
    mobile_number: string = "";
    mobile_number_verified: boolean = false;
    phone_number: string = "";
    phone_number_verified: boolean = false;
    profile: string = "";
    picture: string = "";
    website: string = "";
    gender: string = "";
    zoneinfo: string = "";
    locale: string = "";
    birthdate: string = "";
    address?: AddressEntity;
    customFields?: Map;
    roles: string[] = [];
    groups: UserGroupMap[] = [];
    updated_at: number;
    identities: Identities[] = []

}
export interface IUserGroupMap {
    sub: string;
    groupId: string;
    roles: string[];
    appendRole: boolean;
    eventType: string;
    status: number;
}
export interface Identities {
    provider: string;
    identityId: string;
    providerUserId: string;
    email: string;
    phone_number: string;
    mobile_number: string;
    rawJson: string;
    customFields:  Map;
}
export class AddressEntity {
    formatted: string = "";
    street_address: string = "";
    locality: string = "";
    region: string = "";
    postal_code: string = "";
    country: string = "";
}

Changes

Not all the fields are returned in the call, based on the scope and claims requiested the user info will be returned. Following the Openid Connect standard fileds for the userinfo object more details

End Session / Logout

V1 API V2 API
curl -X POST \
  'https://base-path.cidaas.de/oauth2-usermanagement/oauth2/logoutsimple?access_token='

  and

  curl -X GET \
  'https://base-path.cidaas.de/oauth2-usermanagement/oauth2/logout?access_token='
curl -X POST \
  'https://base-path.cidaas.de/session/end_session?access_token_hint=eyJraWQiOiJhb2N0IiwiYWxnIjoiUlMyNTYifQ...&post_logout_redirect_uri=http://sampleeshop.cidaas.de/logouturl'

More Details

Change Password

V1 V2
curl -X POST \
  https://base-path.cidaas.de/oauth2-usermanagement/users/changepassword \
  -H 'Content-Type: application/json' \
  -H 'access_token: eyJhbGciOiJSUzI1NiIsImtpZCI6ImQ2M2ExOGU0......' \
  -d '{
    "oldPassword":"xxxxx",
    "newPassword":"yyyyy"
}'
curl -X POST \
  https://base-path.cidaas.de/users-srv/changepassword \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: d3cbb565-aae7-4bfa-8526-65ecafa289df' \
  -d '{
  "old_password": "xxxxx",
  "new_password": "yyyyy",
  "confirm_password": "yyyyy",
  "identityId": "5764e14324aa9a0001cea4bc"
}'

Groups

Please check our new api collections from the api docs : https://api.cidaas.de/

Create Group

V1 API V2 API
curl -X POST \
http://base-path.cidaas.de/groups/group \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 4a9286fd-1c12-48c6-1504-a785156c69f7' \
  -d '{
  "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
  "groupType": "Dealer",
  "parentId": "Bangalore",
  "groupId": "Bellandur",
  "groupName": "Bellandur",
  "description": "Sales & service",
  "customFields": {
    "shopId": "21"
  }
}

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "__v": 0,
        "updatedTime": "2018-07-15T14:10:40.367Z",
        "createdTime": "2018-07-15T14:10:40.367Z",
        "className": "de.cidaas.core.db.UserGroup",
        "_id": "13a37bb3-1184-4e50-8463-11a95dec9e03",
        "path": "/Bangalore/Bellandur/",
        "customFields": {
            "shopId": "21"
        },
        "description": "Sales & service",
        "groupName": "Bellandur",
        "groupId": "Bellandur",
        "groupType": "Dealer",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "groupOwner": "client",
        "parentId": "Bangalore"
    }
}

Error Response :


{
    "success": false,
    "status": 409,
    "error": {
        "code": 11002,
        "moreInfo": "",
        "type": "GroupsException",
        "status": 409,
        "referenceNumber": "1531664445306",
        "error": "This groupid already exists"
    }
}
curl -X POST \
  http://base-path.cidaas.de/groups-srv/usergroup \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 35d10bcc-859b-fdfd-2309-6bc7fae43cae' \
  -d '{
  "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
  "groupType": "Dealer",
  "parentId": "Bangalore",
  "groupId": "Bellandur",
  "groupName": "Bellandur",
  "description": "Sales & service",
  "customFields": {
    "shopId": "21"
  }
}

Response:


{
    "success": true,
    "status": 200,
    "data": {
        "className": "de.cidaas.core.db.UserGroup",
        "_id": "8852f927-6f26-4fd7-bd17-1c73d7fccc59",
        "path": "/Bangalore/Bellandur/",
        "customFields": {
            "shopId": "21"
        },
        "description": "Sales & service",
        "groupName": "Bellandur",
        "groupId": "Bellandur",
        "groupType": "Dealer",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "groupOwner": "client",
        "parentId": "Bangalore"
    }
}

Error Response :


{
    "success": false,
    "status": 409,
    "error": {
        "code": 11002,
        "moreInfo": "",
        "type": "GroupsException",
        "status": 409,
        "referenceNumber": "1531664445306",
        "error": "This groupid already exists"
    }
}

Group Update

V1 V2
curl -X PUT \
  http://base-path.cidaas.de/groups/group \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 7b006eaa-1011-ad05-5f10-0bed6bb8a98d' \
  -d '{
  "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
  "groupType": "Dealer",
  "parentId": "Bangalore",
  "groupId": "Bellandur",
  "groupName": "Bellandur",
  "description": "Sales & service",
  "customFields": {
    "shopId": "21"
  }
}

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "8852f927-6f26-4fd7-bd17-1c73d7fccc59",
        "updatedTime": "2018-07-15T14:17:37.146Z",
        "createdTime": "2018-07-15T14:13:30.005Z",
        "className": "de.cidaas.core.db.UserGroup",
        "path": "/Bangalore/Bellandur/",
        "customFields": {
            "shopId": "21"
        },
        "description": "Sales & service",
        "groupName": "Bellandur",
        "groupId": "Bellandur",
        "groupType": "Dealer",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "groupOwner": "client",
        "parentId": "Bangalore"
    }
}
curl -X PUT \
  http://base-path.cidaas.de/groups-srv/usergroup \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 5cd3d04e-7a81-c54a-6479-9f20552c9448' \
  -d '{
  "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
  "groupType": "Dealer",
  "parentId": "Bangalore",
  "groupId": "Bellandur",
  "groupName": "Bellandur",
  "description": "Sales & service",
  "customFields": {
    "shopId": "21"
  }
}

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "8852f927-6f26-4fd7-bd17-1c73d7fccc59",
        "updatedTime": "2018-07-15T14:19:35.897Z",
        "createdTime": "2018-07-15T14:13:30.005Z",
        "className": "de.cidaas.core.db.UserGroup",
        "path": "/Bangalore/Bellandur/",
        "customFields": {
            "shopId": "21"
        },
        "description": "Sales & service",
        "groupName": "Bellandur",
        "groupId": "Bellandur",
        "groupType": "Dealer",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "__v": 0,
        "groupOwner": "client",
        "parentId": "Bangalore"
    }
}

Group Delete

V1 V2
curl -X DELETE \
  http://base-path.cidaas.de/groups/group/Bellandur \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: d3e648a4-e51c-d73e-dd37-8bdb4c21558d'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "deleted": true
    }
}
curl -X DELETE \
  http://base-path.cidaas.de/groups-srv/usergroup/Bellandur \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 094b2359-52ee-73f8-0e16-d2e9a6985db2'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "deleted": true
    }
}

Get Group

V1 V2
curl -X GET \
  http://base-path.cidaas.de/groups/group/Bellandur \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: ce13da9b-1b48-beb9-fd02-e054143b2bde' \
  -d '{
  "groupId":"Bangalore-12334",
  "groupName":"Bangalore",
  "groupType":"Dealer24",
  "description":"",
  "logoUrl":"",
  "customFields":{
    "key":"value"
  }
}

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "f8678e46-81ab-4b0e-860e-270a7524b35e",
        "updatedTime": "2018-07-15T14:29:42.377Z",
        "createdTime": "2018-07-15T14:29:42.377Z",
        "className": "de.cidaas.core.db.UserGroup",
        "path": "/Bangalore/Bellandur/",
        "customFields": {
            "shopId": "21"
        },
        "description": "Sales & service",
        "groupName": "Bellandur",
        "groupId": "Bellandur",
        "groupType": "Dealer",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "__v": 0,
        "groupOwner": "client",
        "parentId": "Bangalore",
        "roles": []
    }
}
  'http://base-path.cidaas.de/groups-srv/usergroup?groupId=Bellandur' \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'postman-token: 555bfb88-4d34-e35e-0df7-e54a3f959c3c'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "f8678e46-81ab-4b0e-860e-270a7524b35e",
        "updatedTime": "2018-07-15T14:29:42.377Z",
        "createdTime": "2018-07-15T14:29:42.377Z",
        "className": "de.cidaas.core.db.UserGroup",
        "path": "/Bangalore/Bellandur/",
        "customFields": {
            "shopId": "21"
        },
        "description": "Sales & service",
        "groupName": "Bellandur",
        "groupId": "Bellandur",
        "groupType": "Dealer",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "__v": 0,
        "groupOwner": "client",
        "parentId": "Bangalore"
    }
}

User Group Map / Add User to the Group

V1 V2
curl -X POST \
  http://base-path.cidaas.de/groups/map/user \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: ec997d70-01af-0525-7fd1-eb02c5c69422' \
  -d '{
  "userId":"9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
  "groupId":"Bellandur", 
  "roles":["Manager"],
  "appendRole":false
}’

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "bcff925f-16ec-41de-a651-3ce99e271fc4",
        "updatedTime": "2018-07-15T14:47:31.311Z",
        "createdTime": "2018-07-15T14:47:26.858Z",
        "className": "de.cidaas.core.db.UserGroupMap",
        "groupId": "Bellandur",
        "sub": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
        "__v": 1,
        "roles": [
            "Manager"
        ]
    }
}
curl -X POST \
  http://base-path.cidaas.de/groups-srv/usergroupmap/assign \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 71847b51-1a85-a021-3cdb-235f31db580d' \
  -d '{
  "groupId": "Bangalore",
  "sub": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
  "roles": [
    "Manager"
  ],
  "appendRole":false
}'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "48523d32-e25b-4afc-985b-aeec7eebb042",
        "updatedTime": "2018-07-15T14:51:28.082Z",
        "createdTime": "2018-07-15T14:47:01.229Z",
        "className": "de.cidaas.core.db.UserGroupMap",
        "sub": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
        "groupId": "Bangalore",
        "__v": 1,
        "roles": [
            "Manager"
        ]
    }
}

User Group map update

V1 V2
curl -X PUT \
  http://base-path.cidaas.de/groups/map/user \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 8a94b3c4-cf8d-52fa-643e-56b8461e5fe5' \
  -d '{
  "userId":"9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
  "groupId":"Bangalore", 
  "roles":["Manager"]
}'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "48523d32-e25b-4afc-985b-aeec7eebb042",
        "updatedTime": "2018-07-15T14:56:13.519Z",
        "createdTime": "2018-07-15T14:47:01.229Z",
        "className": "de.cidaas.core.db.UserGroupMap",
        "sub": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
        "groupId": "Bangalore",
        "__v": 3,
        "roles": [
            "Manager"
        ]
    }
}
User group map creation & updation is same call.

Remove User from Group

V1 V2
curl -X DELETE \
  http://base-path.cidaas.de/groups/map/user/9f27b8ac-0651-4edf-a44c-77af3b4d44f0/Bangalore \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 2011a420-4fe5-5594-ed6b-5a40eca9dc13'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "deleted": true
    }
}
curl -X DELETE \
  http://base-path.cidaas.de/groups-srv/usergroupmap/Bangalore/9f27b8ac-0651-4edf-a44c-77af3b4d44f0 \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'postman-token: 35fcb570-3d9e-9d54-3bb2-7c8885cfa564'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "deleted": true
    }
}

Get User's Group info

V1 V2
curl -X GET \
  http://base-path.cidaas.de/groups/user/9f27b8ac-0651-4edf-a44c-77af3b4d44f0 \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'postman-token: bcedf015-07ca-49fb-2931-25e4b0ad8419'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "groupMetaData": [
            {
                "_id": "8158b62b-4efb-4a73-b7ab-14577c595f9d",
                "path": "/Bangalore/",
                "groupName": "Bangalore",
                "groupId": "Bangalore",
                "groupType": "Dealer"
            },
            {
                "_id": "f8678e46-81ab-4b0e-860e-270a7524b35e",
                "path": "/Bangalore/Bellandur/",
                "groupName": "Bellandur",
                "groupId": "Bellandur",
                "groupType": "Dealer"
            }
        ],
        "data": [
            {
                "_id": "a38b2cff-5298-4d61-a40b-9cd668f51fd0",
                "groupId": "CIDAAS_USERS",
                "groupName": "CIDAAS_USERS",
                "path": "/CIDAAS_USERS/",
                "roles": [
                    "USER"
                ],
                "groupPath": "/:CIDAAS_USERS/"
            },
            {
                "_id": "684f5fa1-174b-44f6-af3e-c92a8bd694b6",
                "groupId": "Bangalore",
                "groupName": "Bangalore",
                "groupType": "Dealer",
                "path": "/Bangalore/",
                "roles": [
                    "APP_CREATE",
                    "GROUP_ADMIN"
                ],
                "groupPath": "/Dealer:Bangalore/"
            },
            {
                "_id": "28783ec7-ce2d-4765-8c33-f52b1f28f070",
                "groupId": "Bellandur",
                "groupName": "Bellandur",
                "groupType": "Dealer",
                "path": "/Bangalore/Bellandur/",
                "roles": [
                    "Manager",
                    "GROUP_ADMIN"
                ],
                "groupPath": "/Dealer:Bangalore/Dealer:Bellandur/"
            }
        ]
    }
}
curl -X GET \
  http://base-path.cidaas.de/groups-srv/usergroupmap/userwithmetadata/9f27b8ac-0651-4edf-a44c-77af3b4d44f0 \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'postman-token: 5cdbbdef-4211-3788-b11a-5e84277bd8fd'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "groupMetaData": [
            {
                "_id": "8158b62b-4efb-4a73-b7ab-14577c595f9d",
                "path": "/Bangalore/",
                "groupName": "Bangalore",
                "groupId": "Bangalore",
                "groupType": "Dealer"
            },
            {
                "_id": "f8678e46-81ab-4b0e-860e-270a7524b35e",
                "path": "/Bangalore/Bellandur/",
                "groupName": "Bellandur",
                "groupId": "Bellandur",
                "groupType": "Dealer"
            }
        ],
        "data": [
            {
                "_id": "a38b2cff-5298-4d61-a40b-9cd668f51fd0",
                "groupId": "CIDAAS_USERS",
                "groupName": "CIDAAS_USERS",
                "path": "/CIDAAS_USERS/",
                "roles": [
                    "USER"
                ],
                "groupPath": "/:CIDAAS_USERS/"
            },
            {
                "_id": "684f5fa1-174b-44f6-af3e-c92a8bd694b6",
                "groupId": "Bangalore",
                "groupName": "Bangalore",
                "groupType": "Dealer",
                "path": "/Bangalore/",
                "roles": [
                    "APP_CREATE",
                    "GROUP_ADMIN"
                ],
                "groupPath": "/Dealer:Bangalore/"
            },
            {
                "_id": "28783ec7-ce2d-4765-8c33-f52b1f28f070",
                "groupId": "Bellandur",
                "groupName": "Bellandur",
                "groupType": "Dealer",
                "path": "/Bangalore/Bellandur/",
                "roles": [
                    "Manager",
                    "GROUP_ADMIN"
                ],
                "groupPath": "/Dealer:Bangalore/Dealer:Bellandur/"
            }
        ]
    }
}
V1 V2
curl -X POST \
  http://base-path.cidaas.de/groups/group/search \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: d23a259f-709d-f48a-3ed8-3a38b0579345' \
  -d '{
  "groupId":"Bangalore",
  "includeChildGroups":true
}'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "8158b62b-4efb-4a73-b7ab-14577c595f9d",
        "updatedTime": "2018-07-15T13:54:03.696Z",
        "createdTime": "2018-07-15T13:54:03.696Z",
        "className": "de.cidaas.core.db.UserGroup",
        "path": "/Bangalore/",
        "description": "Bangalore",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "groupName": "Bangalore",
        "groupId": "Bangalore",
        "groupType": "Dealer",
        "__v": 0,
        "groupOwner": "client",
        "parentId": "root",
        "childGroups": [
            {
                "_id": "f8678e46-81ab-4b0e-860e-270a7524b35e",
                "updatedTime": "2018-07-15T14:29:42.377Z",
                "createdTime": "2018-07-15T14:29:42.377Z",
                "className": "de.cidaas.core.db.UserGroup",
                "path": "/Bangalore/Bellandur/",
                "description": "Sales & service",
                "groupName": "Bellandur",
                "groupId": "Bellandur",
                "groupType": "Dealer",
                "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
                "__v": 0,
                "groupOwner": "client",
                "parentId": "Bangalore",
                "childGroups": []
            }
        ]
    }
}
curl -X POST \
  http://base-path.cidaas.de/groups-srv/usergroup/search \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: b50886f9-aca2-d275-2f91-3e128797ae3f' \
  -d '{
  "groupId":"Bangalore",
  "includeChildGroups":true
}'

Response :


{
    "success": true,
    "status": 200,
    "data": {
        "_id": "8158b62b-4efb-4a73-b7ab-14577c595f9d",
        "updatedTime": "2018-07-15T13:54:03.696Z",
        "createdTime": "2018-07-15T13:54:03.696Z",
        "className": "de.cidaas.core.db.UserGroup",
        "path": "/Bangalore/",
        "description": "Bangalore",
        "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
        "groupName": "Bangalore",
        "groupId": "Bangalore",
        "groupType": "Dealer",
        "__v": 0,
        "groupOwner": "client",
        "parentId": "root",
        "childGroups": [
            {
                "_id": "f8678e46-81ab-4b0e-860e-270a7524b35e",
                "updatedTime": "2018-07-15T14:29:42.377Z",
                "createdTime": "2018-07-15T14:29:42.377Z",
                "className": "de.cidaas.core.db.UserGroup",
                "path": "/Bangalore/Bellandur/",
                "description": "Sales & service",
                "groupName": "Bellandur",
                "groupId": "Bellandur",
                "groupType": "Dealer",
                "logoUrl": "https://cdn.cidaas.de/management/images/logo-black.png",
                "__v": 0,
                "groupOwner": "client",
                "parentId": "Bangalore",
                "childGroups": []
            }
        ]
    }
}

User Search By GroupIDs & GroupType

V1 V2
curl -X POST \
  http://base-path.cidaas.de/groups/group/user/search \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: b4cc6c80-9dd5-56b9-1df0-887249cf9d40' \
  -d '{
  "groupIds":["Bangalore"],
  "includingChildGroups":true,
  "includingRoles":true,
  "groupType":"",
  "skip":0,
  "take":3
}'

Response :


{
    "success": true,
    "status": 200,
    "data": [
        {
            "_id": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
            "sub": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
            "userId": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
            "groups": {
                "Bangalore": [
                    "APP_CREATE",
                    "GROUP_ADMIN"
                ],
                "Bellandur": [
                    "Manager",
                    "GROUP_ADMIN"
                ]
            }
        }
    ]
}
curl -X POST \
  http://base-path.cidaas.de/groups-srv/usergroupmap/search \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 71d7f787-d864-1cd9-19cc-ae7c03d36eaf' \
  -d '{
  "groupIds":["Bangalore"],
  "includingChildGroups":true,
  "includingRoles":true,
  "groupType":"",
  "skip":0,
  "take":3
}'

Response :


{
    "success": true,
    "status": 200,
    "data": [
        {
            "_id": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
            "sub": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
            "userId": "9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
            "groups": {
                "Bangalore": [
                    "APP_CREATE",
                    "GROUP_ADMIN"
                ],
                "Bellandur": [
                    "Manager",
                    "GROUP_ADMIN"
                ]
            }
        }
    ]
}

Verify user (Check the user is exists in this group with specific roles)

V1 V2
curl -X POST \
  http://base-path.cidaas.de/groups/verify \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 27bf1640-fcac-5a27-c029-2bdc17235bca' \
  -d '{
  "userId":"9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
  "groupId":"Bangalore",
  "groupType":"",
  "roles":["APP_CREATE"]
}'

Response :


{
    "success": true,
    "status": 200
}
curl -X POST \
  http://base-path.cidaas.de/groups-srv/usergroupmap/verify \
  -H 'access_token: eyJhbGciOiJSUzI1......' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 17e8b258-60ad-3c62-21d5-8586cd2b0acf' \
  -d '{
  "userId":"9f27b8ac-0651-4edf-a44c-77af3b4d44f0",
  "groupId":"Bangalore",
  "groupType":"",
  "roles":["APP_CREATE"]
}'

Response :


{
    "success": true,
    "status": 200
}

results matching ""

    No results matching ""