ApiErrorCode: Add API error code 401, 405

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
commands.properties: add login,logout,samlsso,samlslo apis

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
saml2: add opensaml as dependency

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
APIAuthenticator: Add interface definition for the auth mechanisms

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
APIAuthenticationType: Add auth enum type, login or logout

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
APIAuthenticationManager: Add Auth manager definition

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
DefaultLogoutAPIAuthenticatorCmd: Refactor and implement the logout mechanism

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
DefaultLoginAPIAuthenticatorCmd: Refactor and implement the default login mechanism

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
APIAuthenticationManagerImpl: add the auth manager and bean entry in spring xmls

- This implements ManageBase, is a pluggable service
- Has a mechanism to return commands, useful for apidocs etc.
- Has a method to return APIAuthenticator based on API command name

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
response: add command response for login and logout command classes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiResponseSerializer: Skip extra boxing for Auth responses

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiXmlDocWriter: remove hardcoded login and logout apis

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiServlet: use the new and refactored authentication mechanism

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiXmlDocWriter: get rid of hardcoded login/logout docs

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiServlet: move setting of response type up in the layer

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
APIAuthenticator: refactor signature of APIAuthenticator interface's authenticate

Pass HttpServletResponse as it can be useful for authenticators which need to
have their own writer interface/method

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiServletTest: Fix test, now login/logout have their own API/class

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
utils: refactor HTTP transport stuff to HttpUtils

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
BaseCmd: Use HttpUtils to have single source of static string values

cloud-api depends on cloud-utils, it makes sense to refactor and put common
and static stuff in cloud-utils

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
ApiResponseSerializer: Use HttpUtils instead of BaseCmd

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>