change auth type to enum