public static void authorize ( Subject user , Class < ? > protocol ) throws AuthorizationException { Permission permission = protocolToPermissionMap . get ( protocol ) ; if ( permission == null ) { permission = new ConnectionPermission ( protocol ) ; protocolToPermissionMap . put ( protocol , permission ) ; } checkPermission ( user , permission ) ; }
Authorize the user to access the protocol being used .