Using ember query params to put encryption key in uri
moving to canaray build cause in beta and stable builds do not contain features
This commit is contained in:
parent
f856860515
commit
1c79ee674c
2 changed files with 4535 additions and 2065 deletions
15
index.html
15
index.html
|
@ -28,6 +28,8 @@
|
||||||
<h2>type</h2>
|
<h2>type</h2>
|
||||||
<p>{{type}}</p>
|
<p>{{type}}</p>
|
||||||
|
|
||||||
|
<p>key: {{encryptionKey}}</p>
|
||||||
|
|
||||||
<h2>options and user</h2>
|
<h2>options and user</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -104,6 +106,11 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- DEPEDENCIES -->
|
<!-- DEPEDENCIES -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
// enable ember query-params-new feature
|
||||||
|
window.ENV = {FEATURES: {'query-params-new': true}};
|
||||||
|
</script>
|
||||||
|
|
||||||
<script src="lib/sjcl.js"></script>
|
<script src="lib/sjcl.js"></script>
|
||||||
<script src="lib/jquery-2.0.3.js"></script>
|
<script src="lib/jquery-2.0.3.js"></script>
|
||||||
<script src="lib/handlebars-v1.2.0.js"></script>
|
<script src="lib/handlebars-v1.2.0.js"></script>
|
||||||
|
@ -135,10 +142,11 @@
|
||||||
// adding support for encrypted string type
|
// adding support for encrypted string type
|
||||||
App.EncryptedStringTransform = DS.Transform.extend({
|
App.EncryptedStringTransform = DS.Transform.extend({
|
||||||
deserialize: function(serialized) {
|
deserialize: function(serialized) {
|
||||||
return Ember.isNone(serialized) ? null : String( sjcl.decrypt('key', serialized) );
|
console.log(this.get('controller.encryptionKey'))
|
||||||
|
return Ember.isNone(serialized) ? null : String( sjcl.decrypt( 'key' , serialized) );
|
||||||
},
|
},
|
||||||
serialize: function(deserialized) {
|
serialize: function(deserialized) {
|
||||||
return Ember.isNone(deserialized) ? null : String( sjcl.encrypt('key', deserialized) );
|
return Ember.isNone(deserialized) ? null : String( sjcl.encrypt( 'key' , deserialized) );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -317,6 +325,9 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
App.PollController = Ember.ObjectController.extend({
|
App.PollController = Ember.ObjectController.extend({
|
||||||
|
queryParams: ['encryptionKey'],
|
||||||
|
encryptionKey: 'nicht definiert',
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
save: function(){
|
save: function(){
|
||||||
// create new user record in store
|
// create new user record in store
|
||||||
|
|
6357
lib/ember.js
6357
lib/ember.js
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue