Skip to content

Instantly share code, notes, and snippets.

View mikedao's full-sized avatar
🤷

Michael Dao mikedao

🤷
View GitHub Profile

#Authorization

So yesterday we learned about authentication and today we are going to talk about its partner, authorization.

  • How would you define authentication?
  • With that definition in mind, how would you define authorization?

I like to think of authentication as being able to prove that you are who you say you are, but authorization is being allowed where you are allowed.

Example, I can show up to the White House with my photo ID and passport and I can prove to the people there that I am who I am, but they’re not going to let me into the Oval Office. Probably the best I can swing is going to be a public restroom and the gift shop.

Challenge Part 1:

A fun exercise which is always good Ruby practice is to re-implement an existing Ruby method. This morning, we are going to be re-implementing #reverse.

Create a file in a folder using touch reverse.rb

In that file, write a method that will take a string as an argument and return that string reversed. Something like this:

@mikedao
mikedao / b2_intermission_work.md
Last active April 25, 2024 23:18 — forked from BrianZanti/b2_intermission_work.md
B2 Intermission Work Submission

B2 Intermission Work

Answer these Check for Understanding questions as you work through the assignments.

HTML

  1. What is HTML?
  2. What is an HTML element?
  3. What is an HTML attribute?
  4. What is the difference between a class and an id? When would you use one vs. the other?

Exercise, Part One: The Presidents

For this exercise, we're going to use a table of the Presidents of the United States of America.

Let's try out a few things, just to get our hands dirty. We'll use the console in the Chrome developer tools to validate our work.

  • Select each tr element.
  • Select the first tr element only.
require "minitest/autorun"
require "minitest/pride"
require "./lib/patron"
class PatronTest < Minitest::Test
def test_patron_has_attributes
patron = Patron.new("Bob")
assert_equal "Bob", patron.name
### Monday
* Table 1 (3) - Rob, Emmie, Cole
* Table 2 (6) - Tyler, Zachary, Sabrina, Justin, Steve, Justine
* Table 3 (6) - Mellisa, Jude, Blythe, Bryan, Seth, Jamison, Judson
* Table 4 (4) - Jane, John, Tristan, Angi
* Table 5 (4) - Chris, Charles, Manoj, Matt
* Table 6 (4) - Claire, Jerrel, RIchard
### Tuesday
* Table 1 (3) - Cole, John, Zach
  • Written Diagnostic
  • Watch this
  • Fundamental Refactoring Patterns reading
Wednesday
Table 1 - Justine, Judston, Blythe, Rob
Table 2 - Cole, Jamison, Sabrina, Bryan, Emmie, Tristan
Table 3 - Chris, Mellisa, Lawson, Jane, Charles, Angi
Table 4 - Steve, Angela, Jerrel, John
Table 5 - Matt, Tyler, Seth, Richard
Table 6 - Zach, Justin, Claire
Thursday
Table 1 - Zach, Jerrel, Judson, Rob
* Zachary Thomas & Blythe McFall & Bryan Combs & Charles Lee & Chris Powell & Claire Beauvais
* Cole Hart & Emmie Hayes & Jamison Ordway & Jane Kim & Jerrel Mitchell & John Livingston
* Judson Stevens & Justin Highland & Justine Troyke & Kelly Marcilliat
* Lawson Dutton & Manoj Panta & Matt Bricker & Melissa Luce
* Richard Serrano & Rob McCluskey & Sabrina Robinson & Seth Schwartz
* Steve Schwedt & Tristan Bambauer & Tyler Westlie & Angela Colling