Make common code for omniauth providers (helps: ldap, pam, shibboleth, cas)

Created by: raphendyr

Cleaned and generalized omniauth code so different omniauth providers add as small amount of code as possible.

This helps users to configure new omniauth providers.

Closes #3134 (closed)

合并请求报告