APIs by Example: Swapping User Profiles

When you write a server program to handle requests across a network or the Internet, you often ask the user to sign-in with a username and password. From that point on, each request to your server program needs to run with the authority of that user.

This installment of Carsten Flensburg’s APIs by Example shows us how to swap user profiles. By “swap,” I mean that it switches to another user profile, performs a task, and then switches back. In this case, the “task” is to set the user’s “last sign-on date” and “last sign-on time.”

Download the save file containing the source code.

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s