use of org.finos.symphony.toolkit.spring.api.properties.IdentityProperties in project spring-bot by finos.
the class BasicAppIdentityProvider method getFileResourceLocation.
protected IdentityProperties getFileResourceLocation(String appId) {
IdentityProperties p = new IdentityProperties();
p.setType(Type.JSON);
p.setLocation("file:./" + appId + JSON);
return p;
}
use of org.finos.symphony.toolkit.spring.api.properties.IdentityProperties in project spring-bot by finos.
the class BasicAppIdentityProvider method getIdentity.
public SymphonyIdentity getIdentity() throws Exception {
SymphonyIdentity out = null;
IdentityProperties identity = p.getIdentity();
String appId = getAppId(p);
if (identity != null) {
out = performIdentityLoad(identity, appId);
}
if (out == null) {
out = performIdentityLoad(getClasspathResourceLocation(appId), appId);
}
if (out == null) {
out = performIdentityLoad(getFileResourceLocation(appId), appId);
}
if (out == null) {
throw new IdentityConfigurationException("Couldn't load app identity", null);
}
return out;
}
use of org.finos.symphony.toolkit.spring.api.properties.IdentityProperties in project spring-bot by finos.
the class BasicAppIdentityProvider method getClasspathResourceLocation.
protected IdentityProperties getClasspathResourceLocation(String appId) {
IdentityProperties p = new IdentityProperties();
p.setType(Type.JSON);
p.setLocation("classpath:/ssl/" + appId + JSON);
return p;
}
Aggregations