Skip to content

Commit 32025f9

Browse files
committed
Update README.md for KeyStoreSettings
1 parent e132e52 commit 32025f9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ onelogin.saml2.contacts.support.email_address = support@example.com
361361

362362
##### KeyStores
363363

364-
The Auth constructor supports the ability to read SP public cert/private key from a KeyStore. A KeyStoreSettings object must be provided with the KeyStore, the Alias and the storePass if any.
364+
The Auth constructor supports the ability to read SP public cert/private key from a KeyStore. A KeyStoreSettings object must be provided with the KeyStore, the Alias and the KeyEntry password.
365365

366366
```java
367367
import java.io.FileInputStream;
@@ -370,13 +370,14 @@ import com.onelogin.saml2.Auth
370370
import com.onelogin.saml2.model.KeyStoreSettings
371371

372372
String keyStoreFile = "oneloginTestKeystore.jks";
373-
String alias = "onelogintest";
373+
String alias = "keywithpassword";
374374
String storePass = "changeit";
375+
String keyPassword = "keypassword";
375376

376377
KeyStore ks = KeyStore.getInstance("JKS");
377-
ks.load(new FileInputStream(keyStoreFile), password.toCharArray());
378+
ks.load(new FileInputStream(keyStoreFile), storePass.toCharArray());
378379

379-
KeyStoreSettings keyStoreSettings = new keyStoreSettings(ks, alias, storePass);
380+
KeyStoreSettings keyStoreSettings = new keyStoreSettings(ks, alias, keyPassword);
380381
Auth auth = new Auth(KeyStoreSettings keyStoreSetting);
381382
```
382383

0 commit comments

Comments
 (0)