reading-notes

Class 401.15

Notes

Readings

  1. Explain the difference between a query string parameter and a path parameter.

    A query string parameter is included after the ‘?’ in a URL and is used to filter or sort data, for example http://our-site.com?color=red. A path parameter, on the other hand, is part of the URL path itself and is used to identify a specific resource, like http://our-site.com/items/1.

  2. What would our API URL with a path id parameter be given the following information:
    1. Domain: http://our-site.com
    2. v3
    3. model name: stuff
    4. id: things

      Given this information, the API URL with a path id parameter would be http://our-site.com/v3/stuff/things.

  3. We have created a dynamic API with an “interface”. Describe how that interface works to a non-technical friend.

    The interface is like a restaurant menu. It lists all the options you can request from our API (the kitchen). When you choose something from the menu (make a request), our API prepares and serves up the data (the meal).

  1. Describe how you would use middleware to implement basic and bearer auth.

    Middleware in this context acts like a security guard, checking credentials (basic auth with username and password or bearer auth with a token) before granting access to certain routes or data.

  2. Describe the handshake necessary to implement OAuth.

    The OAuth handshake involves three steps. The user authenticates directly with an OAuth provider (like Google), the provider gives the user a special code, which the user then trades with our server for an access token.

  3. Describe how Role Based Access Control works to a non-technical friend.

    Role Based Access Control is like having different keys for different doors in a building. Depending on your role (your key), you can access certain parts of the application (doors).

Things I want to learn more about

References