Comments (5)
Found solution.
- It is necessary to put this code on common-crypt => KeystoreServiceImpl :
@Service("keystoreService")
public class KeystoreServiceImpl implements InitializingBean, KeystoreService
{
@Autowired
private CryptoProperties cryptoProperties;
private PrivateKey privateKey;
private PublicKey publicKey;
public void afterPropertiesSet() throws Exception
{
try
{
KeyStore ks = KeyStore.getInstance("JCEKS");
ks.load(new FileInputStream(cryptoProperties.getSimpleKeystore()), cryptoProperties.getSimplePassword().toCharArray());
privateKey = (PrivateKey) ks.getKey(cryptoProperties.getKeyAlias(), cryptoProperties.getSimplePassword().toCharArray());
publicKey = ks.getCertificate(cryptoProperties.getKeyAlias()).getPublicKey();
}
catch (Throwable e)
{
throw new IllegalArgumentException("Failed to read the private token key from the keystore", e);
}
}
public PrivateKey getPrivateKey()
{
return privateKey;
}
public PublicKey getPublicKey()
{
return publicKey;
}
}
- generate JCEKS with java Keytool :
keytool -genkeypair -alias ohadr -dname cn=localhost -validity 365 -keyalg DSA -keysize 1024 -keypass secret -storetype jceks -keystore keystore.jck -storepass secret
from authentication-flows.
thanks!
did you see this, in the wiki, regarding the keytool? https://github.com/OhadR/oAuth2-sample#keystore-things-to-know
from authentication-flows.
@devabe if this problem is solved, can you please close this issue?
from authentication-flows.
from authentication-flows.
thanks for closing.
if you have another issue, please do not hesitate to open a new one here (e.g. "check-token-enabled
").
from authentication-flows.
Related Issues (20)
- allow to edit user's account (name, etc...) HOT 1
- internal methods that return Pair<String, String>: get rid of this mechanism
- unbind version of auth-flows from crypto's version
- enable tests with mvn-surefire-plugin (not only with eclipse/junit)
- Unit tests
- interface AuthenticationFlowsProcessor: some methods can be removed
- allow postLogin actions (like postAccountCreation) HOT 1
- Could you please create a simple Spring MVC Security user registration and forgot password example? HOT 8
- Clarify the license HOT 1
- InMemoryAuthenticationAccountRepositoryImpl.loadUserByUsername - never return null
- OAuth: auth-server does not ask user for approval (after login)
- make sure links are single-used
- work with com.mchange:c3p0 (rathen than c3p0:c3p0)
- all dependencies that are DB-relevant should be removed
- delete AuthenticationFailureHandler.SPRING_SECURITY_FORM_USERNAME_KEY
- authentication failure flow is not working properly HOT 1
- oAuth sample - client: propertize the oAuth server calls (host/port)
- create new project: authentication-flows-gae HOT 1
- Build fails (travis) - jdk8 no longer supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from authentication-flows.