AUTH Part First

Some content or resources may be available for public consumption and don’t require any type of identification or authentication — think of basic web site content. However, protected resources do require additional security steps. The first step of access control at runtime is authentication because if we can’t reliably and securely validate the subject identity, how can we make appropriate decisions about what they can and can’t do? Think of authentication as a crucial precursor to authorization.

Authentication is important because it enables organizations to keep their networks secure by permitting only authenticated users (or processes) to access its protected resources, which may include computer systems, networks, databases, websites and other network-based applications or services.

Let’s create an example of simple AUTH first part

First part (create user)

1 step — Create a new rails app

2 step — Install Bcrypt

Go to Gemfile and uncomment line with:

Run in your terminal: Bundle install

3 step — Create a route to create a user action

Go to route.rb and write:

4 step — Create a controller Users

Run in your terminal: Rails g controller Users. Then write a create action in Users_controller.rb:

5 step — Create a user model

Run in your terminal: Rails g model User. Inside the model user.rb write :

6 step — Create a migration

Set attributes inside the migration file:

Run in your terminal: Rails db:migrate

7 step — Create a new user with Postman

So, the first part is done.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

{UPDATE} HackBeam Hack Free Resources Generator

Tachyon Protocol Weekly Report #121

Security Alert Analysis Using GPUs

Premium features — file attachments, 2FA options, TOTP, & priority support

Going SOCless

The Future Is Now: Duncan Greatwood of Xage Security On How Their Technological Innovation Will…

Security vs Convenience: The Battle for Balance

Hackers, scammers, and thieves, what can you do to protect your assets? Authored by Ehvrin.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Iuliia Saprykina

Iuliia Saprykina

More from Medium

Why does a software developer need to implement CI with Jenkins | Ansible | Artifactory?


the gist of angular library ci/cd

Interaction with low-level FireDac objects in TDataSet