Multiple choice technology security

What exception is thrown by the security API when a user attempts to access a resource that they are not authorized for?

  1. SecurityException

  2. AccessException

  3. AuthenitcationException

  4. Exception

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When a user attempts to access a resource without proper authorization in the security API, a SecurityException is thrown. This exception indicates that the authentication was successful but the user lacks the required permissions for the specific resource. AccessException is not a standard security API exception, and AuthenticationException would be thrown for authentication failures (wrong credentials), not authorization issues.