Skip to content

Instantly share code, notes, and snippets.

@gautam1168
Last active September 15, 2016 03:27
Show Gist options
  • Select an option

  • Save gautam1168/ac0300fee2504a0bd848d76cca201a72 to your computer and use it in GitHub Desktop.

Select an option

Save gautam1168/ac0300fee2504a0bd848d76cca201a72 to your computer and use it in GitHub Desktop.
Networks

#Authentication on the web

Techniques that can be used for authentication:

The Cookie and Token based authentication appear to be same but are not. Look at this blog: https://auth0.com/blog/cookies-vs-tokens-definitive-guide/

Reading about Cookies will confuse you further because you don't know what a session is or what it is used for. Look at this blog: http://machinesaredigging.com/2013/10/29/how-does-a-web-session-work/

#LDAP:(Lightweight Directory Access Protocol)

  1. This is a genral introduction to naming services: http://docs.oracle.com/javase/jndi/tutorial/getStarted/concepts/naming.html
  2. This one explains how to set up a LDAP server on Linux: http://www.tldp.org/HOWTO/LDAP-HOWTO/index.html
  3. This article describes what the whole thing is for: http://www.davidpashley.com/articles/ldap-basics/

##In short(my interpretation. no correctness guaranteed.) LDAP is like a database that stores objects. These class types of these objects are defined by LDAP and can be extended by users. The objects in LDAP database are a bit weird in that, a single object can have multiple class types. The objects in LDAP are called entries. The class of an entry determines the attributes in can/should have.

Some of the operations in LDAP server are:

  • add - create new entry in server
  • bind - used to authenticate user
  • compare - check if a specified entry has a particular attribute value

#Classification Classification of networks can be done on the basis of underlying hardware and scale. Based on scale there are PAN(Personal Area Networks), LAN(Local), WAN(Wide) etc.

REST is a specification/constraint/guideline for web applications. An application that follows these guidelines is called restful. The guidelines are on wikipedia. In short, they are:

  1. Separation of concerns: Clients handle the UI and user state. Servers store and manage data.
  2. Stateless: Every request from client will have all information relating to user state. The server will not store any information relating to user state.
  3. Cachable: The responses from REST server are cacheble by the browser. If you don't clear cache stale responses will be used.
  4. Layered: The client cannot tell if it is connected to end server or intermediary.
  5. Code on demand: The server can send applets or client side scripts.
  6. Uniform interface: This one has subcategories and I don't understand what they mean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment