/** * Analyzes the transport object and returns the first binding capable of sending/extracting a SAML message from to/from it. * In case no binding is found SAMLException is thrown. * * @param transport transport type to get binding for * @return decoder * @throws SAMLException in case no suitable decoder is found for given request */ protected SAMLBinding getBinding(InTransport transport) throws SAMLException { for (SAMLBinding binding : bindings) { if (binding.supports(transport)) { return binding; } } throw new SAMLException("Unsupported request"); }