Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java issues with doc for 1.0 #264

Closed
psolstice opened this issue Jan 27, 2017 · 1 comment
Closed

Java issues with doc for 1.0 #264

psolstice opened this issue Jan 27, 2017 · 1 comment
Labels
content-request A request for new content, as opposed to changing/fixing existing content
Milestone

Comments

@psolstice
Copy link
Contributor

  1. realtime/authentication:

authorize() uses different order of arguments in 0.9: TokenParams, then AuthOptions

  1. realtime/connection:

in one of the code snippets
realtime.connection.on('connected', new ConnectionStateListener() {
replace 'connected' with ConnectionEvent.connected. A text preceding this snippet must also be changed according to ConnectionState/ConnectionEvent scheme of emitting events

  1. realtime/channel-messages:

In the code snippet regarding encryption this line
options.cipher = params;
is wrong (cipher is of wrong type and private). It should be changed to either
options.encrypted = true; options.cipherParams = params;
or to ChannelOptions.fromCipherKey method of ChannelOption creation

In "Handling channel errors" section. First sentence. synchronous -> asynchronous

  1. realtime/encryption:

The doc mentions the key should be 128 or 256 bit long. In the implementation 192 is a valid value too. Also for Java 128 bit is default (IMHO because of additional actions required to enable 256-bit crypto in Oracle JRE).

Crypto.getDefaultParam`: we decided against function with such arguments
the code snippet is wrong (same mistake as the one mentioned above in section (3) of this issue)

generateRandomKey: definitely not a Java syntax, code snippet uses withCipher instead of fromCipherKey

io.ably.lib.types.ClientOptions: should read io.ably.types.ChannelOptions, only CipherParams are supported, withCipherKey -> fromCipherKey

io.ably.lib.util.Crypto.CipherParams: default key length for Java is 128, PKCS#7 -> PKCS#5

Some of the issues mentioned above happen in REST sections as well

@mattheworiordan mattheworiordan changed the title Issues with doc Java issues with doc for 1.0 Jan 27, 2017
@mattheworiordan mattheworiordan added the content-request A request for new content, as opposed to changing/fixing existing content label Jan 27, 2017
@mattheworiordan mattheworiordan added this to the 1.0 spec milestone Jan 27, 2017
@mattheworiordan
Copy link
Member

Thanks @psolstice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content-request A request for new content, as opposed to changing/fixing existing content
Development

No branches or pull requests

2 participants