// validState validates the state stored client-side with the request's state,
// it returns false if the states are not equal to each other.
validState validates the state stored client-side with the request's state,
it returns false if the states are not equal to each other.
// validState validates the state stored client - side with the request ' s state // it returns false if the states are not equal to each other .
func validState(r *http.Request) bool {
	session, _ := store.Get(r, "golinkedinapi")
	retrievedState := session.Values["state"]
	if getSessionValue(retrievedState) != r.Header.Get("state") {
		return false
	}
	return true
}
func validState ( r * http . Request ) bool { session , _ := store . Get ( r , " " ) retrievedState := session . Values [ " " ] if getSessionValue ( retrievedState ) != r . Header . Get ( " " ) { return false } return true }
validState validates the state stored client-side with the request's state,
it returns false if the states are not equal to each other.
validState validates the state stored client - side with the request ' s state it returns false if the states are not equal to each other .
// Retrieve state // Compare state to header's state