It depends on the use case, extending makes sense if you want to reuse or build on top of the existing logic, which results in a better upgradability for most of the cases.
But in general, both should work OK, as you will end up with the new class that you'll have to provide as AuthGuard
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…