Skip to content

Commit

Permalink
make the class fields more restrictive
Browse files Browse the repository at this point in the history
Signed-off-by: liga-oz <[email protected]>
  • Loading branch information
liga-oz committed Jan 4, 2024
1 parent 303a81d commit 32539e7
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
public class HybridTokenFactory implements TokenFactory {

private static final Logger LOGGER = LoggerFactory.getLogger(HybridTokenFactory.class);
protected static Optional<String> xsAppId;
protected static ScopeConverter xsScopeConverter;
static Optional<String> xsAppId;
static ScopeConverter xsScopeConverter;

/**
* Determines whether the JWT token is issued by XSUAA or IAS identity service,
Expand Down Expand Up @@ -84,10 +84,13 @@ private static Optional<String> getXsAppId() {
}
OAuth2ServiceConfiguration serviceConfiguration = Environments.getCurrent().getXsuaaConfiguration();
if (serviceConfiguration != null) {
return xsAppId = Optional.of(serviceConfiguration.getProperty(CFConstants.XSUAA.APP_ID));
xsAppId = Optional.of(serviceConfiguration.getProperty(CFConstants.XSUAA.APP_ID));
} else {
LOGGER.warn(
"There is no xsuaa service configuration with 'xsappname' property: no local scope check possible.");
xsAppId = Optional.empty();
}
LOGGER.warn("There is no xsuaa service configuration with 'xsappname' property: no local scope check possible.");
return xsAppId = Optional.empty();
return xsAppId;
}

/**
Expand Down

0 comments on commit 32539e7

Please sign in to comment.