Search in sources :

Example 1 with ErrorResponseFactory

use of io.jans.as.model.error.ErrorResponseFactory in project jans by JanssenProject.

the class ConfigurationFactory method initAuthConfiguration.

private void initAuthConfiguration(Conf conf) {
    if (conf.getDynamic() != null) {
        appConfiguration = conf.getDynamic();
        log.trace("Auth Config - appConfiguration: {}", appConfiguration);
    }
    if (conf.getStatics() != null) {
        staticConf = conf.getStatics();
    }
    if (conf.getWebKeys() != null) {
        jwks = conf.getWebKeys();
    }
    if (conf.getErrors() != null) {
        errorResponseFactory = new ErrorResponseFactory(conf.getErrors(), conf.getDynamic());
    }
}
Also used : ErrorResponseFactory(io.jans.as.model.error.ErrorResponseFactory)

Example 2 with ErrorResponseFactory

use of io.jans.as.model.error.ErrorResponseFactory in project jans by JanssenProject.

the class ConfigurationFactory method reloadErrorsFromFile.

private boolean reloadErrorsFromFile() {
    final ErrorMessages errorsFromFile = loadErrorsFromFile();
    if (errorsFromFile != null) {
        log.info("Reloaded errors from file: {}", errorsFilePath);
        errorResponseFactory = new ErrorResponseFactory(errorsFromFile, conf);
        return true;
    } else {
        log.error("Failed to load errors from file: {}", errorsFilePath);
    }
    return false;
}
Also used : ErrorMessages(io.jans.as.model.error.ErrorMessages) ErrorResponseFactory(io.jans.as.model.error.ErrorResponseFactory)

Aggregations

ErrorResponseFactory (io.jans.as.model.error.ErrorResponseFactory)2 ErrorMessages (io.jans.as.model.error.ErrorMessages)1