[cf-dev] How to lock account in UAA using UAA API? #cf

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[cf-dev] How to lock account in UAA using UAA API? #cf

shilpa kulkarni
Hello,
I am using cloud foundry UAA APIs.  I want to lock user account. But in the API documentation,  I am getting only unlock account API. 
Reference link:
http://docs.cloudfoundry.org/api/uaa/version/4.12.0/#unlock-account

Is there any way to lock account in UAA using API.?

Thanks & Regards
Shilpa Kulkarni
_._,_._,_

Links:

You receive all messages sent to this group.

View/Reply Online (#7922) | [hidden email] | [hidden email] | Mute This Topic | New Topic
Mute #cf

Change Your Subscription
Group Home
[hidden email]
Terms Of Service
Unsubscribe From This Group

_._,_._,_
DHR
Reply | Threaded
Open this post in threaded view
|

Re: [cf-dev] How to lock account in UAA using UAA API? #cf

DHR
Hi Shilpa,

Did you try sending a PATCH request as per the example you linked, with locked: true ?

Eg

PATCH /Users/0daf6e54-52c5-4360-bd4a-77f5355950b3/status HTTP/1.1
Content-Type: application/json
Authorization: Bearer fe11ae74b429403796ea13c017bff06c
Accept: application/json
Host: localhost
Content-Length: 22

{
  "locked" : true }

On 19 Apr 2018, at 08:13, shilpa kulkarni <[hidden email]> wrote:

Hello,
I am using cloud foundry UAA APIs.  I want to lock user account. But in the API documentation,  I am getting only unlock account API. 
Reference link:
http://docs.cloudfoundry.org/api/uaa/version/4.12.0/#unlock-account

Is there any way to lock account in UAA using API.?

Thanks & Regards
Shilpa Kulkarni
_._,_._,_

Links:

You receive all messages sent to this group.

View/Reply Online (#7923) | [hidden email] | [hidden email] | Mute This Topic | New Topic
Mute #cf

Change Your Subscription
Group Home
[hidden email]
Terms Of Service
Unsubscribe From This Group

_._,_._,_
Reply | Threaded
Open this post in threaded view
|

Re: [cf-dev] How to lock account in UAA using UAA API? #cf

shilpa kulkarni
Hi DHR,

Yes I tried setting locked to true as follows:

But I am getting following error response:
{
  "error_description": "Cannot set user account to locked. User accounts only become locked through exceeding the allowed failed login attempts.",
  "error": "scim",
  "message": "Cannot set user account to locked. User accounts only become locked through exceeding the allowed failed login attempts."
}
_._,_._,_

Links:

You receive all messages sent to this group.

View/Reply Online (#7924) | [hidden email] | [hidden email] | Mute This Topic | New Topic
Mute #cf

Change Your Subscription
Group Home
[hidden email]
Terms Of Service
Unsubscribe From This Group

_._,_._,_
DHR
Reply | Threaded
Open this post in threaded view
|

Re: [cf-dev] How to lock account in UAA using UAA API? #cf

DHR
In that case you might have to send an updated request with “active”: false via a PUT request to /Users/:guid

On 20 Apr 2018, at 11:25, shilpa kulkarni <[hidden email]> wrote:

Hi DHR,

Yes I tried setting locked to true as follows:

But I am getting following error response:
{
  "error_description": "Cannot set user account to locked. User accounts only become locked through exceeding the allowed failed login attempts.",
  "error": "scim",
  "message": "Cannot set user account to locked. User accounts only become locked through exceeding the allowed failed login attempts."
}
_._,_._,_

Links:

You receive all messages sent to this group.

View/Reply Online (#7925) | [hidden email] | [hidden email] | Mute This Topic | New Topic
Mute #cf

Change Your Subscription
Group Home
[hidden email]
Terms Of Service
Unsubscribe From This Group

_._,_._,_
Reply | Threaded
Open this post in threaded view
|

Re: [cf-dev] How to lock account in UAA using UAA API? #cf

shilpa kulkarni