implement basic auth support and use a factory to create a suitable SecurityContext, as that is application dependent