how to update user profile using API (PUT) in cs-cart - cs-cart

http://localhost/multivendor_v4.11.5/api/users?email=dev#gmail.com&user_type=C&company_id=0&status=A&firstname=dev&lastname=dev&company=&company_name=no&password1=12345678&password2=12345678&phone=4444444999&user_id=20&profile_id=21
I tried update user profile using this URL in Postman but it is not working.
I need to pass some more parameter to run this request?

Related

How to login to liferay website using JMeter

I am facing one problem that i am unable to login to the liferay website using JMeter.
The problem i know already but don't know how to hanmdle it.
I get to know that "p_auth" token is requried to access the sub pages, but here i am facing an issue in which i don't even able to acccess the login page itself if run the script second time.
My concerns:
how to check "p_auth" token parameter for login page (i.e without login)
Please help me to solve the problem.
Note: i tried to extract the "p_auth" token , but i am unable to see any "p_auth" token for login page itself(i.e without login.. just a login page(get api))
Your test plan need to look like:
Open Login Page - HTTP GET request
Extract p_auth dynamic parameter value using a suitable JMeter Post-Processor
Perform the login - HTTP POST request where you need to provide your credentials and the p_auth token value from the previous request
You won't be able to "see" the token in the page, it's hidden in the page source so you will need to use browser developer tools or JMeter's View Results Tree listener in order to "see" the token value.
Also don't forget to add HTTP Cookie Manager to your test plan as missing CSRF token is not the only thing which can stop you from logging in.

Login with Google in Laravel using Postman

I am new to laravel and making a login with the Google module in Laravel using Postman. I've successfully generated a Google access token. But how to make the whole module of login with Google in Postman? and Can we use that access token in other modules?
I think it is not possible with Postman.
there are two things will be possible
You can configure your app with Google and send information to server (Database) through API.
or you can create a webpage and there you have to create a setup to login with google and save information in database and send success or failure in form of response

Redirecting to local post route

Short version
Do we need GuzzleHttp to redirect to local POST route? Can't we do this directly using redirect()?
Long version
Following this Laravel tutorial about using Passport authentication, the presenter talks about a way of hiding client_id to increase security (check at around 11:45 in the video).
The idea is to expose a new wrapper route that accepts only username and password fields and then the controller injects client_id on the server-side and makes a new call to Passport's original login route. This call is made using GuzzleHttp client. Response of the call is then returned by the wrapper route to the caller.
My question is: Do we really need to install and use Guzzle? Can't we redirect to Passport's login route using redirect() or some other built-in Laravel function?
You need Guzzle to make a HTTP request so that you can modify the response before sending it.
You will not be able to hide any data using redirect() because it will just tell the browser (client) to use the passport route directly.
To avoid making the HTTP a call you could get your route to run the code that the passport route runs and then modify the response that is generated. Making a local HTTP call should not be a problem though.

User getting signed out automatically after password update in Laravel. How I prevent this?

I am trying to update the user password via CURL call. created an API for that. But, every time user getting signed out if I do password update. I tried direct SQL method and that also not working. How do I prevent this. ?
I have tried below code after every password update. But it works only on HTTP request. Not working on API calls.
Auth::login($user);
If you are using session based auth, you can't use CURL call since the server will setup new session to the browswer when return response. Why don't you use form submit instead of CURL?

stateToken for Change Password with JS widget

We're trying to use the JS widget to enable change password (password's not expired, just changing it).
The REST API requires a stateToken but i can't see any way to create/generate a state token.
We've got the widget working for other scenarios but just not this one.
Are you trying to use the /authn/credentials/change_password endpoint? That one does require a stateToken, but it's only available in the authn flow (when the status is PASSWORD_EXPIRED).
If you're trying to change a password after the user has logged in and you've converted your sessionToken to a session cookie, you can use the /users api:
/users/:id/credentials/change_password
Documentation for that endpoint is here:
http://developer.okta.com/docs/api/resources/users.html#change-password

Resources