示例#1
0
func getCreateUserCommandForProxyAuth(headerVal string, domainVal string) *m.CreateUserCommand {
	cmd := m.CreateUserCommand{}
	log.Info("MY TEST LOG on create user")
	if setting.AuthProxyHeaderProperty == "username" {
		cmd.Login = headerVal
		cmd.Email = headerVal
		cmd.Domain = domainVal
	} else if setting.AuthProxyHeaderProperty == "email" {
		cmd.Email = headerVal
		cmd.Login = headerVal
		cmd.Domain = domainVal
	} else {
		panic("Auth proxy header property invalid")
	}
	return &cmd
}