File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
java/io/openliberty/sample/cloudant Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 36
36
<artifactId >cloudant</artifactId >
37
37
<version >0.9.2</version >
38
38
</dependency >
39
+ <dependency >
40
+ <groupId >com.ibm.websphere.appserver.api</groupId >
41
+ <artifactId >com.ibm.websphere.appserver.api.passwordUtil</artifactId >
42
+ <version >1.0.95</version >
43
+ </dependency >
39
44
<!-- Test Dependencies-->
40
45
<dependency >
41
46
<groupId >org.junit.jupiter</groupId >
Original file line number Diff line number Diff line change 11
11
package io .openliberty .sample .cloudant ;
12
12
13
13
import jakarta .enterprise .context .ApplicationScoped ;
14
+ import com .ibm .websphere .crypto .PasswordUtil ;
14
15
import jakarta .enterprise .inject .Produces ;
15
16
import jakarta .inject .Inject ;
16
17
import org .eclipse .microprofile .config .inject .ConfigProperty ;
@@ -37,7 +38,7 @@ public class CloudantProducer {
37
38
38
39
@ Inject
39
40
@ ConfigProperty (name = "cloudant.password" )
40
- String password ;
41
+ String encodedPassword ;
41
42
42
43
43
44
@ Inject
@@ -46,6 +47,7 @@ public class CloudantProducer {
46
47
47
48
@ Produces
48
49
public Cloudant createCloudant () {
50
+ String password = PasswordUtil .passwordDecode (encodedPassword );
49
51
BasicAuthenticator authenticator = new BasicAuthenticator .Builder ()
50
52
.username (username )
51
53
.password (password )
Original file line number Diff line number Diff line change 12
12
13
13
<webApplication location =" CloudantSample.war" contextRoot =" /" />
14
14
<variable name =" cloudant.username" value =" admin" />
15
- <variable name =" cloudant.password" value =" password " />
15
+ <variable name =" cloudant.password" value =" {aes}AEEjCqvh7XAwDxrdYC6BUbqYlwqI8NAxRkWWWq7muxZu " />
16
16
<variable name =" cloudant.dbname" value =" testdb" />
17
17
18
18
</server >
You can’t perform that action at this time.
0 commit comments