Class who manage link between FireGPG and the website who use the api
| FireGPG.Api | Class who manage link between FireGPG and the website who use the api |
| Functions | |
| onLoad | Init api features when a new page is loaded |
| listenerUnload | Remove all api listeners |
| hello | Return ‘firegpg-ok’ in ‘result’ (useful to test firegpg’s api presence) |
| auth | Return ‘auth-ok’ in ‘result’ (or ‘auth-fail’ is the website have rights to use the api |
| register | Try to register a webpage (ask the user). |
| getDataNode | Return the node with data attributes for return |
| listkey | Return ‘list-ok’ in ‘result’ (or ‘list-err’ is there is a problem), and the list of public key in list |
| listprivkey | Return ‘list-ok’ in ‘result’ (or ‘list-err’ is there is a problem), and the list of private key in list |
| check | Return ‘check-ok’ in ‘result’ (or ‘check-err’ is there is a problem) if the sign is valid. |
| sign | Return ‘sign-ok’ in ‘result’ (or ‘sign-err’ is there is a problem) if makeing a sign was successfull Return in ‘text’ a signed text |
| signandencrypt | Return ‘signandencrypt-ok’ in ‘result’ (or ‘signandencrypt-err’ is there is a problem) if makeing a signed and encrypted text was successfull Return in ‘text’ the encrypted text |
| encrypt | Return ‘encrypt-ok’ in ‘result’ (or ‘encrypt-err’ is there is a problem) if makeing a ecnrypted text was successfull Return in ‘text’ the encrypted text |
| decrypt | Return ‘decrypt-ok’ in ‘result’ (or ‘decrypt-err’ is there is a problem) if trying to decrypt a text was successfull Return in ‘text’ the decrypted text |
| removeDoublePoint | Change # to #1, : to #2 and , to #3 in a string |
| getReturnDataNode | Return the node with data attributes for return |
| register | Authenticate a domain|website|page and return the api key |
| denyRegister | Deny futur registrations from a domain|website|page |
| canRegister | Return true if the user have right to try toregister to use FireGPG’s api |
| isAuth | Return true if the user have right to use FireGPG’s api |
| getDomain | Get the current domain for the page, or the webpage if we’re in local (file://) |
| getAccessList | Return the list of access |
| setAccessList | Set a new list of access |
signandencrypt: function ( event )
Return ‘signandencrypt-ok’ in ‘result’ (or ‘signandencrypt-err’ is there is a problem) if makeing a signed and encrypted text was successfull Return in ‘text’ the encrypted text
| auth_key | the key for the website |
| text | the text to check |
| keys | the keys list |
| force-key | optional, to force the gpg’s key to use |
getDomain: function( url )
Get the current domain for the page, or the webpage if we’re in local (file://)
Init api features when a new page is loaded
onLoad: function()
Remove all api listeners
listenerUnload: function( event )
Return ‘firegpg-ok’ in ‘result’ (useful to test firegpg’s api presence)
hello: function ( event )
Return ‘auth-ok’ in ‘result’ (or ‘auth-fail’ is the website have rights to use the api
auth: function ( event )
Try to register a webpage (ask the user).
register: function ( event )
Return the node with data attributes for return
getDataNode: function( d )
Return ‘list-ok’ in ‘result’ (or ‘list-err’ is there is a problem), and the list of public key in list
listkey: function ( event )
Return ‘list-ok’ in ‘result’ (or ‘list-err’ is there is a problem), and the list of private key in list
listprivkey: function ( event )
Return ‘check-ok’ in ‘result’ (or ‘check-err’ is there is a problem) if the sign is valid.
check: function ( event )
Return ‘sign-ok’ in ‘result’ (or ‘sign-err’ is there is a problem) if makeing a sign was successfull Return in ‘text’ a signed text
sign: function ( event )
Return ‘signandencrypt-ok’ in ‘result’ (or ‘signandencrypt-err’ is there is a problem) if makeing a signed and encrypted text was successfull Return in ‘text’ the encrypted text
signandencrypt: function ( event )
Return ‘encrypt-ok’ in ‘result’ (or ‘encrypt-err’ is there is a problem) if makeing a ecnrypted text was successfull Return in ‘text’ the encrypted text
encrypt: function ( event )
Return ‘decrypt-ok’ in ‘result’ (or ‘decrypt-err’ is there is a problem) if trying to decrypt a text was successfull Return in ‘text’ the decrypted text
decrypt: function ( event )
Change # to #1, : to #2 and , to #3 in a string
removeDoublePoint: function( s )
Return the node with data attributes for return
getReturnDataNode: function( d )
Deny futur registrations from a domain|website|page
denyRegister: function( theLocation, type )
Return true if the user have right to try toregister to use FireGPG’s api
canRegister: function( theLocation )
Return true if the user have right to use FireGPG’s api
isAuth: function( key, document )
Get the current domain for the page, or the webpage if we’re in local (file://)
getDomain: function( url )
Return the list of access
getAccessList: function()
Set a new list of access
setAccessList: function( arrayy )