Cidaas Free signup

  • Improved the performance of the cidaas free signup process

API changes

Well-known Openid Configuration

V1

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"
  ]
}

V2

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

https://base-path.cidaas.de/oauth2-login/oauth2/authz?client_id={{client_id}}&redirect_uri={{redirect_uri}}&viewtype={{login/password/register}}&reponse_type={{token/code}}

or

https://base-path.cidaas.de/oauth2-login/oauth2/authz?client_id={{client_id}}&redirect_uri={{redirect_uri}}&grant_type={{login/password/register}}&reponse_type={{token/code}}

V2

https://base-path.cidaas.de/authz-srv/authz?client_id={{client_id}}&redirect_uri={{redirect_uri}}&view_type={{login/register}}

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

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.

Access Token Payload

V1

{
  "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"
}

V2

{
  "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

<dependency>
    <groupId>de.cidaas</groupId>
    <artifactId>oauth2-interceptor</artifactId>
    <version>1.2.2</version>
</dependency>

or

<dependency>
    <groupId>de.carbook</groupId>
    <artifactId>oauth2-interceptor</artifactId>
    <version>...</version>
</dependency>

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

<dependency>
    <groupId>de.cidaas</groupId>
    <artifactId>cidaas-interceptor-java</artifactId>
    <version>1.0.3</version>
</dependency>

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

Authentication

Token Generation

V1

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": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM5MzRhYmNhLTk1MGMtNDU0OS05OTc0LTIzZDFjYjgzZjIwZSJ9.eyJzaWQiOiIwMjdlZTQ0Yy1lODliLTRiYjEtODUwNS1jOTE2ZDU2NzNhYmQiLCJzdWIiOiJkYjg0OTJkMS0wYjZiLTRhNzItOTNmZS1hZGUyNjY2MGQwYzgiLCJpc3ViIjoiZjA4MWQ4ZjYtZGRiNy00ZWI1LTkxODEtMDUxNzgzYjc1YWUwIiwiYXVkIjoiMzc4YWJmODktZjg2MS00MWQ5LWE3ZjYtMGIzOGQyMmZiZjk4IiwiaWF0IjoxNTI4MjIwOTE4LCJhdXRoX3RpbWUiOjE1MjgyMjA5MTgsImlzcyI6Imh0dHBzOi8vY2lkYWFzLW1hbmFnZW1lbnQuY2lkYWFzLmRlIiwianRpIjoiZDE3MGRmZjctNTYyNi00NTBkLTg4ZjQtODRmMjlkMmEyNzcwIiwic2NvcGVzIjpbIm9wZW5pZCIsInByb2ZpbGUiLCJlbWFpbCIsInBob25lIl0sInJvbGVzIjpbIlVTRVIiLCJTRUNPTkRBUllfQURNSU4iXSwicm9sZSI6IlVTRVIsU0VDT05EQVJZX0FETUlOIiwiY2xpZW50aWQiOiIzNzhhYmY4OS1mODYxLTQxZDktYTdmNi0wYjM4ZDIyZmJmOTgiLCJleHAiOjE1MjgzMDczMTg0MzcsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgcGhvbmUifQ.KuKCimacIzcZpUPEE8s2vVEtQ6ocO9IL2t8WaHs8t0cxr4pC8fqs3TBdqqmZWmOYyeO9yOq5h7cXUbFWCCFCd7sjBzkkF5HOwuuu_Y0IStq-HNIIn68Hy8n66pztW4ZwLk1HcakDYg2l40kbS-BVgVTDwI4BVnXTEtT8aRulc_k"
}

V2

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": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM5MzRhYmNhLTk1MGMtNDU0OS05OTc0LTIzZDFjYjgzZjIwZSJ9.eyJzaWQiOiJlZTJiOTg5Mi03ZDQ4LTQ5NjgtOWE2NS0xYzk2YWY2NWVjMWQiLCJzdWIiOiJkYjg0OTJkMS0wYjZiLTRhNzItOTNmZS1hZGUyNjY2MGQwYzgiLCJpc3ViIjoiZjA4MWQ4ZjYtZGRiNy00ZWI1LTkxODEtMDUxNzgzYjc1YWUwIiwiYXVkIjoiMzc4YWJmODktZjg2MS00MWQ5LWE3ZjYtMGIzOGQyMmZiZjk4IiwiaWF0IjoxNTI4MjIxMDA1LCJhdXRoX3RpbWUiOjE1MjgyMjEwMDUsImlzcyI6Imh0dHBzOi8vY2lkYWFzLW1hbmFnZW1lbnQuY2lkYWFzLmRlIiwianRpIjoiY2M3ZjkyZjYtMTQyOC00ZTE5LWIwYzUtOTZkMGM1MDg3YTQ0Iiwic2NvcGVzIjpbIm9wZW5pZCIsInByb2ZpbGUiLCJlbWFpbCIsInBob25lIl0sInJvbGVzIjpbIlVTRVIiXSwiZ3JvdXBzIjpbeyJncm91cElkIjoiQ0lEQUFTX0FETUlOUyIsInBhdGgiOiIvQ0lEQUFTX0FETUlOUy8iLCJyb2xlcyI6WyJTRUNPTkRBUllfQURNSU4iXX1dLCJleHAiOjE1MjgzMDc0MDV9.qHdW1WmGYNIagRGFopaxLW1J9zm9Yg70iwRCOLuZ0wXnYnuXlhmDUgHcfUT15voci3ZuI0j45pv7DO796y20fydaKndsvJCADHVkE-DcW4TP9fpUXnFS2nc88dY-DDwt0nuPEkb9Hhlf1Lp4rqlh7bRyP_yp9xNxgoNa3JBzSQg",
    "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM5MzRhYmNhLTk1MGMtNDU0OS05OTc0LTIzZDFjYjgzZjIwZSJ9.eyJzaWQiOiJlZTJiOTg5Mi03ZDQ4LTQ5NjgtOWE2NS0xYzk2YWY2NWVjMWQiLCJzdWIiOiJkYjg0OTJkMS0wYjZiLTRhNzItOTNmZS1hZGUyNjY2MGQwYzgiLCJpc3ViIjoiZjA4MWQ4ZjYtZGRiNy00ZWI1LTkxODEtMDUxNzgzYjc1YWUwIiwiYXVkIjoiMzc4YWJmODktZjg2MS00MWQ5LWE3ZjYtMGIzOGQyMmZiZjk4IiwiaWF0IjoxNTI4MjIxMDA1LCJhdXRoX3RpbWUiOjE1MjgyMjEwMDUsImlzcyI6Imh0dHBzOi8vY2lkYWFzLW1hbmFnZW1lbnQuY2lkYWFzLmRlIiwianRpIjoiY2M3ZjkyZjYtMTQyOC00ZTE5LWIwYzUtOTZkMGM1MDg3YTQ0Iiwic2NvcGVzIjpbIm9wZW5pZCIsInByb2ZpbGUiLCJlbWFpbCIsInBob25lIl0sInJvbGVzIjpbIlVTRVIiXSwiZ3JvdXBzIjpbeyJncm91cElkIjoiQ0lEQUFTX0FETUlOUyIsInBhdGgiOiIvQ0lEQUFTX0FETUlOUy8iLCJyb2xlcyI6WyJTRUNPTkRBUllfQURNSU4iXX1dLCJleHAiOjE1MjgzMDc0MDYsImF0X2hhc2giOiJFRzVTV0RBeVM3NWxjd3loaF83WjB3IiwibmFtZSI6ImNpZGFhcyBkZXZlbG9wZXIiLCJmYW1pbHlfbmFtZSI6ImRldmVsb3BlciIsImdpdmVuX25hbWUiOiJjaWRhYXMiLCJtaWRkbGVfbmFtZSI6ImRldmVsb3BlciIsIm5pY2tuYW1lIjoiY2lkYWFzIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZGV2ZWxvcGVyQGNpZGFhcy5kZSIsInByb2ZpbGUiOiJodHRwczovL2NpZGFhcy1tYW5hZ2VtZW50LmNpZGFhcy5kZS9wcm9maWxlL2RiODQ5MmQxLTBiNmItNGE3Mi05M2ZlLWFkZTI2NjYwZDBjOC1mMDgxZDhmNi1kZGI3LTRlYjUtOTE4MS0wNTE3ODNiNzVhZTAiLCJwaWN0dXJlIjoiaHR0cHM6Ly9jaWRhYXMtbWFuYWdlbWVudC5jaWRhYXMuZGUvcHJvZmlsZS9kYjg0OTJkMS0wYjZiLTRhNzItOTNmZS1hZGUyNjY2MGQwYzgtZjA4MWQ4ZjYtZGRiNy00ZWI1LTkxODEtMDUxNzgzYjc1YWUwIiwid2Vic2l0ZSI6Imh0dHBzOi8vY2lkYWFzLmNvbSIsImdlbmRlciI6Im1hbGUiLCJiaXJ0aGRhdGUiOiIyMDE4LTAzLTE0Iiwiem9uZWluZm8iOiJFdXJvcGUvUGFyaXMiLCJsb2NhbGUiOiJlbi11cyIsInVwZGF0ZWRfYXQiOjE1MjU1ODg1NjksImVtYWlsIjoiZGV2ZWxvcGVyQGNpZGFhcy5kZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJwaG9uZV9udW1iZXIiOiIrOTE5NzM4MTIyNDAxIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJtb2JpbGVfbnVtYmVyIjoiKzkxOTczODEyMjQwMSIsIm1vYmlsZV9udW1iZXJfdmVyaWZpZWQiOnRydWV9.JTtltHXUKnq5h26jbuP6g3Z2wXEn8J8UxCLQiFSKjoURiuAOR2oV6WjoiKzNEssfw-4EIjB6UkO_GlM6zPh_XkeHyyru1lKySFI3pH1bHvi0LXDPiJfCITs1cW4wWZeZafYAD2KynYqO8P7zp7kX8AenX1tHpJXOMozCFDFOmio"
}

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

curl -X GET \
  https://base-path.cidaas.de/oauth2-login/oauth2/checktoken \
  -H 'access_token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwMjM2ZWZiLWR........'

Response

true/false

V2

curl -X POST \
  https://base-path.cidaas.de/token-srv/introspect \
  -H 'Authorization: Basic NWVmNDFmNTEtOTY4ZC00NmI0LTk1ODYtYjYxYjEyYThhMDI5OmY5YTA3MDQ1LWE4YmEtNDM4Yi1iMjNkLWY2NzAyMjI3NzI0MQ==' \
  -H 'Content-Type: application/json' \
  -d '{
    "token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjM5MzRhY.......",
    "token_type_hint":"access_token"
}'

Check more options: Introspect Token

Validating the Roles against the Token / Matching Roles

V1

curl -X GET \
  'https://base-path.cidaas.de/oauth2-login/oauth2/userroles/matchingroles?roles=HCBTEST' \
  -H 'access_token: eyJhbGciOiJSUzI1NiIsImtpZCI6......'

V2

Removed the api becuase the role details are embeded in the token.

User Info

V1

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: eyJhbGciOiJSUzI1NiIsImtpZCI6IjM5MzRhYmNhLTk1MGMtNDU0OS05OTc0LTIzZDFjYjgzZjIwZSJ9.eyJzaWQiOiIxM2JhNmE4Ny1iMDRjLTRiN2YtYjFlZS1jZjg4MzBhYjU1YzEiLCJzdWIiOiJkYjg0OTJkMS0wYjZiLTRhNzItOTNmZS1hZGUyNjY2MGQwYzgiLCJpc3ViIjoiZjA4MWQ4ZjYtZGRiNy00ZWI1LTkxODEtMDUxNzgzYjc1YWUwIiwiYXVkIjoiMzc4YWJmODktZjg2MS00MWQ5LWE3ZjYtMGIzOGQyMmZiZjk4IiwiaWF0IjoxNTI4MjIxOTI0LCJhdXRoX3RpbWUiOjE1MjgyMjE5MjQsImlzcyI6Imh0dHBzOi8vY2lkYWFzLW1hbmFnZW1lbnQuY2lkYWFzLmRlIiwianRpIjoiYmY2YjM3YTQtMzliNy00ODdkLThiYjUtMjdmY2I0Njc4MGQwIiwic2NvcGVzIjpbIm9wZW5pZCIsInByb2ZpbGUiLCJlbWFpbCIsInBob25lIl0sInJvbGVzIjpbIlVTRVIiXSwiZ3JvdXBzIjpbeyJncm91cElkIjoiQ0lEQUFTX0FETUlOUyIsInBhdGgiOiIvQ0lEQUFTX0FETUlOUy8iLCJyb2xlcyI6WyJTRUNPTkRBUllfQURNSU4iXX1dLCJleHAiOjE1MjgzMDgzMjR9.XpuOPYyOBayoHAWKvCNl-FWVYwrrWBfdIc9PXzYWHolwLxPsostFHj1cRfd0kkzrt0efH1cxvih7S77sx55Z5P1fZFQ8UKjxUqokmCA12EsmE8oBz8qZjWQKGrDvioPwni9h4pMzVOFkVwFPk-m3ZUJa6Kkl3ZCaGo9EsDKT0pY'

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-ade26660d0c8-f081d8f6-ddb7-4eb5-9181-051783b75ae0",
    "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[];
}

V2

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<string,ICustomFieldData>;
    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<string,ICustomFieldData>;
}
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 : https://docs.cidaas.de/quick-tutorial/standard-endpoints/userinfo.html

V1 and V2 Entity Field Comparison

V1 V2
id -
provider provider
ssoId sub
username username
email email
mobile mobile_number
firstname given_name
lastname family_name
emailVerified email_verified
mobileNoVerified mobile_number_verified
currentLocale locale
userStatus user_status
identityJRString rawJSON
customFields customFields
roles roles
photoURL picture
groupInfo -
displayName name
createTime
active -
twofactorenabled
lastLoggedTime last_accessed_at
lastUsedSocialIdentity last_used_identity_id
usedProviders -
customFieldWithMetadata
groups groups
middle_name
nickname
profile
birthdate
address
identityCustomFields
providerUserId
updated_at
identities

End Session / Logout

V1

curl -X POST \
  'https://base-path.cidaas.de/oauth2-usermanagement/oauth2/logoutsimple?access_token={{token}}'

and

curl -X GET \
  'https://base-path.cidaas.de/oauth2-usermanagement/oauth2/logout?access_token={{token}}'

V2

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

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"
}'

V2

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

Create Group

V1

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"
    }
}

V2

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

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"
    }
}

V2

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

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
    }
}

V2

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

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": []
    }
}

V2

curl -X GET \
  '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

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"
        ]
    }
}

V2

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

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"
        ]
    }
}

V2 :

User group map creation & updation is same call.

Remove User from Group

V1

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
    }
}

V2

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

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/"
            }
        ]
    }
}

V2

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

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": []
            }
        ]
    }
}

V2

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

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"
                ]
            }
        }
    ]
}

V2

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

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
}

V2

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 ""