File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
server-am/src/main/java/co/oslc/refimpl/am/gen/auth
server-cm/src/main/java/co/oslc/refimpl/cm/gen/auth
server-qm/src/main/java/co/oslc/refimpl/qm/gen/auth
server-rm/src/main/java/co/oslc/refimpl/rm/gen/auth Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
7676 private AuthenticationApplication () {
7777 // Start of user code constructor_init
7878 // End of user code
79+ var AUTH_VAR = "OAUTH_STORE_FILE" ;
80+ final Map <String , String > env = System .getenv ();
7981 oslcConsumerStoreFilename = "./oslcOAuthStore.xml" ;
82+ if (env .containsKey (AUTH_VAR )) {
83+ oslcConsumerStoreFilename = env .get (AUTH_VAR );
84+ log .debug ("ENV variable '{}' found" , AUTH_VAR );
85+ } else {
86+ log .debug ("ENV variable '{}' not defined" , AUTH_VAR );
87+ }
8088 oauth1TokenToApplicationConnector = new LRUCache <String , String >(2000 );
8189 // Start of user code constructor_finalize
8290 // End of user code
Original file line number Diff line number Diff line change @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
7676 private AuthenticationApplication () {
7777 // Start of user code constructor_init
7878 // End of user code
79+ var AUTH_VAR = "OAUTH_STORE_FILE" ;
80+ final Map <String , String > env = System .getenv ();
7981 oslcConsumerStoreFilename = "./oslcOAuthStore.xml" ;
82+ if (env .containsKey (AUTH_VAR )) {
83+ oslcConsumerStoreFilename = env .get (AUTH_VAR );
84+ log .debug ("ENV variable '{}' found" , AUTH_VAR );
85+ } else {
86+ log .debug ("ENV variable '{}' not defined" , AUTH_VAR );
87+ }
8088 oauth1TokenToApplicationConnector = new LRUCache <String , String >(2000 );
8189 // Start of user code constructor_finalize
8290 // End of user code
Original file line number Diff line number Diff line change @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
7676 private AuthenticationApplication () {
7777 // Start of user code constructor_init
7878 // End of user code
79+ var AUTH_VAR = "OAUTH_STORE_FILE" ;
80+ final Map <String , String > env = System .getenv ();
7981 oslcConsumerStoreFilename = "./oslcOAuthStore.xml" ;
82+ if (env .containsKey (AUTH_VAR )) {
83+ oslcConsumerStoreFilename = env .get (AUTH_VAR );
84+ log .debug ("ENV variable '{}' found" , AUTH_VAR );
85+ } else {
86+ log .debug ("ENV variable '{}' not defined" , AUTH_VAR );
87+ }
8088 oauth1TokenToApplicationConnector = new LRUCache <String , String >(2000 );
8189 // Start of user code constructor_finalize
8290 // End of user code
Original file line number Diff line number Diff line change @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
7676 private AuthenticationApplication () {
7777 // Start of user code constructor_init
7878 // End of user code
79+ var AUTH_VAR = "OAUTH_STORE_FILE" ;
80+ final Map <String , String > env = System .getenv ();
7981 oslcConsumerStoreFilename = "./oslcOAuthStore.xml" ;
82+ if (env .containsKey (AUTH_VAR )) {
83+ oslcConsumerStoreFilename = env .get (AUTH_VAR );
84+ log .debug ("ENV variable '{}' found" , AUTH_VAR );
85+ } else {
86+ log .debug ("ENV variable '{}' not defined" , AUTH_VAR );
87+ }
8088 oauth1TokenToApplicationConnector = new LRUCache <String , String >(2000 );
8189 // Start of user code constructor_finalize
8290 // End of user code
You can’t perform that action at this time.
0 commit comments