Code Fellows Notes
The path parameter defines the resource location, while the query parameter defines sort, pagination, or filter operations. The user’s input (the query) is passed as a variable in the query parameter, while each path parameter must be substituted with an actual value when the client makes an API call.
http://our-site.com/v3/stuff/things
Basic auth middleware provides an HTTP basic authentication. For valid credentials it calls the next handler. In the context of an HTTP transaction, basic access authentication is a method for an HTTP user agent (e.g. a web browser) to provide a user name and password when making a request. In basic HTTP authentication, a request contains a header field in the form of Authorization: Basic <credentials>
, where credentials is the Base64 encoding of ID and password joined by a single colon :.
Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The name “Bearer authentication” can be understood as “give access to the bearer of this token.” The bearer token is a cryptic string, usually generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources
Step 1 – The User Shows Intent. Step 2 – The Consumer Gets Permission. Step 3 – The User Is Redirected to the Service Provider. Step 4 – The User Gives Permission. Step 5 – The Consumer Obtains an Access Token. Step 6 – The Consumer Accesses the Protected Resource.