Added AFSecurityPolicy protocol and changed other classes to use instance which confirms to protocol rather then instance of AFSecurityPolicy class directly.