io.castled.CastledAuthenticator Maven / Gradle / Ivy
package io.castled;
import com.google.inject.Inject;
import io.castled.models.users.User;
import io.castled.services.UsersService;
import io.dropwizard.auth.Authenticator;
import java.util.Optional;
public class CastledAuthenticator implements Authenticator {
private final UsersService usersService;
@Inject
public CastledAuthenticator(UsersService usersService) {
this.usersService = usersService;
}
@Override
public Optional authenticate(String dummy) {
return Optional.ofNullable(usersService.getUser());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy