As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
p ="password" | |
#according to PKCS#5, should be at least 8 bytes. Public information, can be stored along with the pwd. | |
s = OpenSSL::Random.random_bytes(16) | |
c = 20000 # varies depending on how fast the system is, tweak until it takes "long enough" | |
digest = OpenSSL::Digest::SHA256.new | |
#should be >= the output size of the underlying hash function, but ">" doesn't improve security (says PKCS#5) | |
dk_len = digest.digest_length | |
#store the result for new passwords | |
value = OpenSSL::PKCS5.pbkdf2_hmac(p, s, c, dk_len, digest) |
This is a initial proposal on having a very simple persistence layer
/* Need to add license, description, etc. */ | |
// This will be broken into its own file to be reused | |
(function( window, undefined ) { | |
var aerogear = window.aerogear = { | |
}; | |
})( this ); | |
// AeroGear Pipeline |
Request Headers | |
POST /todo-server/rest/task HTTP/1.1 | |
Host: localhost:8080 | |
Connection: keep-alive | |
Content-Length: 124 | |
Origin: http://localhost:8080 | |
X-Requested-With: XMLHttpRequest | |
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 | |
Content-Type: application/json | |
Accept: */* |
Below is how routes are defined in aerogear-controller:
Routes routes = new AbstractRoutingModule() {
@Override
public void configuration() {
route()
.from("/home")
.on(GET)
.to(SampleController.class).index();
}
The pipeline object (AGPipeline):
/**
* AGPipeline represents a 'collection' of server connections (pipes) and
* their corresponding data models. This object provides a standard way to
* communicate with the server no matter the data format or transport expected.
*
This is a very high level overview of the DataManager spec for the AeroGear.js library. This can also be used as inspiration for the other client libraries and is open for discussion from all points of view.
Similar to AeroGear.Pipeline, this is an object used as a factory for creating new DataManager objects, which at this time are being referred to as valves in an attempt to stay with the Pipeline theme but is definitely not a name that is set in stone. A new valve is based off of adapters and planned adapters for the JS lib are memory (default), session/local storage, IndexedDB and possibly Web SQL though I believe this is no longer maintained and may be unnecessary. These objects then deal only with client side data.
this.getData = function() { | |
return data; | |
}; | |
this.setData = function( newData ) { | |
data = newData; | |
}; | |
this.addDataRecord = function( record ) { | |
data.push( record ); | |
}; | |
this.removeDataRecord = function( record ) { |
This document is intended to describe AeroGear Controllers integration with RestEasy.
Currently, the routes that AeroGear Controller can handle are "one way" in the sense that they go through AeroGear Controller are forwarded to a view, which can be populated by a data model provided by the Controller for the route in question.
For example:
route()
.from("/customers/{id}")
.on(RequestMethod.GET)