Implement agnostic authentication logic