-
Notifications
You must be signed in to change notification settings - Fork 826
https://servicecomb.atlassian.net/browse/JAV-501 #307
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
Conversation
fix bug and add sample
2. bug gix 3. 增加UT
@@ -0,0 +1,33 @@ | |||
package io.servicecomb.foundation.common.utils; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code template is not correct, please check etc folder for eclipse and IDEA code template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accept , forget to format
public static RSAKeyPairEntry getRSAKeyPair() { | ||
try { | ||
KeyPairGenerator keyGenerator = KeyPairGenerator.getInstance(RSA_ALG); | ||
keyGenerator.initialize(1024, new SecureRandom()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key size is too short
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accept ,change to 2048
import org.apache.log4j.spi.LoggingEvent; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.junit.runners.Parameterized.Parameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused imports, please clear all compile warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accept
if(!token.isPresent()) | ||
{ | ||
asyncResp.consumerFail( | ||
new Error("rejected by consumer authentication handler")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not throw Error for application invoke. Do you mean this will throw an Error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Exception?
2. fix ut
As a developer, I need to have authentication in service provider to protect the microservice from unauthorized access