action

How to implement user authentication in a Play Framework application

Table of Contents1 - Resources2 - A custom user authentication action3 - Use that action in your controller methods4 - A sample form5 - Setting the user login cookie6 - Discussion

This past week I started working with the Play Framework (version 2.6), and this is a quick look at how to implement user authentication in a Play application. Specifically this blog post focuses on how to create a custom action so you can secure your Play controllers methods, where you’ll implement those methods using this new, custom action.

Android source code to show a popup dialog with a text field

I am working on a way to rapidly mock up Android applications using Android Studio, i.e., to rapidly prototype Android applications on the fly, and little snippets of code help to make this happen. For instance, this snippet of code shows how to show a popup dialog to prompt a user to enter information into a text field:

This is a page from my book, “A Survival Guide for New Consultants”

Learn how to influence people

“When you listen to someone, 
you should give up all your preconceived ideas 
and subjective opinions; you should just listen to him, 
just observe what his way is.”

Zen Master Shunryu Suzuki

If you’ve read the previous chapters, you’re now well past the basics. You’re a trustworthy person, a problem solver, you don’t create any problems for your sponsor, and you know how to make the big decisions. Now we’ll dig into a few of the finer points of being a consultant.

Don’t post stuff on social media, take action

For everyone who is upset by the actions of the current president and other political leaders, I urge you to take action. By “action” I don’t mean posting things on social networks. I mean writing your senators and congressmen. I mean peacefully marching and demonstrating. I mean supporting others who are marching and demonstrating. Every time you think about sharing a post, send a check to the ACLU and other organizations that are fighting against hate, oppression, destruction of the environment, etc. Otherwise, it’s just a lot of people preaching to the choir.

#imho

A list of Play Framework controller action results (result types)

When you’re writing Play Framework controller actions, you’re typically going to be returning a Play Results, with the most common result being Ok. However, your controller actions can return many different result types. This table shows some of the most common result types that you can use instead of Ok: