Search in sources :

Example 1 with AuthServiceBackend

use of org.graylog.security.authservice.AuthServiceBackend in project graylog2-server by Graylog2.

the class AuthServiceBackendTestService method createNewBackend.

private Optional<AuthServiceBackend> createNewBackend(AuthServiceBackendTestRequest request) {
    final AuthServiceBackendDTO newBackend = request.backendConfiguration();
    final AuthServiceBackend.Factory<? extends AuthServiceBackend> backendFactory = backendFactories.get(newBackend.config().type());
    if (backendFactory == null) {
        return Optional.empty();
    }
    return Optional.of(backendFactory.create(newBackend));
}
Also used : AuthServiceBackendDTO(org.graylog.security.authservice.AuthServiceBackendDTO) AuthServiceBackend(org.graylog.security.authservice.AuthServiceBackend)

Aggregations

AuthServiceBackend (org.graylog.security.authservice.AuthServiceBackend)1 AuthServiceBackendDTO (org.graylog.security.authservice.AuthServiceBackendDTO)1