Added new argument to lasso_login_build_authn_request_msg.
This commit is contained in:
parent
68b494d9b5
commit
90f1e1f493
|
@ -472,8 +472,9 @@ class Login(_ObjectMixin, lassomod.LassoLogin, _ProfileChild):
|
|||
if errorCode:
|
||||
raise newError(errorCode, 'lasso_login_build_artifact_msg')
|
||||
|
||||
def build_authn_request_msg(self, remote_providerID):
|
||||
errorCode = lassomod.lasso_login_build_authn_request_msg(self, remote_providerID)
|
||||
def build_authn_request_msg(self, remote_providerID, http_method):
|
||||
errorCode = lassomod.lasso_login_build_authn_request_msg(
|
||||
self, remote_providerID, http_method)
|
||||
if errorCode:
|
||||
raise newError(errorCode, 'lasso_login_build_authn_request_msg')
|
||||
|
||||
|
@ -497,14 +498,14 @@ class Login(_ObjectMixin, lassomod.LassoLogin, _ProfileChild):
|
|||
if errorCode:
|
||||
raise newError(errorCode, 'lasso_login_init_authn_request')
|
||||
|
||||
def init_from_authn_request_msg(self, authn_request_msg, authn_request_method):
|
||||
def init_from_authn_request_msg(self, authn_request_msg, authn_request_http_method):
|
||||
errorCode = lassomod.lasso_login_init_from_authn_request_msg(
|
||||
self, authn_request_msg, authn_request_method)
|
||||
self, authn_request_msg, authn_request_http_method)
|
||||
if errorCode:
|
||||
raise newError(errorCode, 'lasso_login_init_from_authn_request_msg')
|
||||
|
||||
def init_request(self, response_msg, response_method):
|
||||
errorCode = lassomod.lasso_login_init_request(self, response_msg, response_method)
|
||||
def init_request(self, response_msg, response_http_method):
|
||||
errorCode = lassomod.lasso_login_init_request(self, response_msg, response_http_method)
|
||||
if errorCode:
|
||||
raise newError(errorCode, 'lasso_login_init_request')
|
||||
|
||||
|
@ -725,7 +726,7 @@ if __name__ == '__main__':
|
|||
login.request.set_isPassive(False)
|
||||
login.request.set_nameIDPolicy(libNameIDPolicyTypeFederated)
|
||||
login.request.set_consent(libConsentObtained)
|
||||
login.build_authn_request_msg('https://idp1/metadata')
|
||||
login.build_authn_request_msg('https://idp1/metadata', httpMethodRedirect)
|
||||
print 'Redirect URL =', login.msg_url
|
||||
shutdown()
|
||||
else:
|
||||
|
|
|
@ -233,7 +233,7 @@ class ServiceProviderMixin(Provider.ProviderMixin):
|
|||
login.request.set_consent(lasso.libConsentObtained)
|
||||
if relayState:
|
||||
login.request.set_relayState(relayState)
|
||||
login.build_authn_request_msg(self.idpSite.providerId)
|
||||
login.build_authn_request_msg(self.idpSite.providerId, lasso.httpMethodRedirect)
|
||||
authnRequestUrl = login.msg_url
|
||||
failUnless(authnRequestUrl)
|
||||
return handler.respondRedirectTemporarily(authnRequestUrl)
|
||||
|
|
12
swig/Lasso.i
12
swig/Lasso.i
|
@ -144,8 +144,6 @@ typedef enum {
|
|||
%constant xmlChar *lassoLibNameIDPolicyTypeAny = "any";
|
||||
|
||||
/* ProtocolProfile */
|
||||
%constant xmlChar *lassoLibProtocolProfileSSOGet = "http://projectliberty.org/profiles/sso-get";
|
||||
%constant xmlChar *lassoLibProtocolProfileSSOPost = "http://projectliberty.org/profiles/sso-post";
|
||||
%constant xmlChar *lassoLibProtocolProfileBrwsArt = "http://projectliberty.org/profiles/brws-art";
|
||||
%constant xmlChar *lassoLibProtocolProfileBrwsPost = "http://projectliberty.org/profiles/brws-post";
|
||||
%constant xmlChar *lassoLibProtocolProfileFedTermIdpHttp = "http://projectliberty.org/profiles/fedterm-idp-http";
|
||||
|
@ -560,9 +558,11 @@ gint lasso_login_accept_sso(LassoLogin *login);
|
|||
|
||||
gint lasso_login_build_artifact_msg(LassoLogin *login, gint authentication_result,
|
||||
const gchar *authenticationMethod,
|
||||
const gchar *reauthenticateOnOrAfter, lassoHttpMethod method);
|
||||
const gchar *reauthenticateOnOrAfter,
|
||||
lassoHttpMethod http_method);
|
||||
|
||||
gint lasso_login_build_authn_request_msg(LassoLogin *login, const gchar *remote_providerID);
|
||||
gint lasso_login_build_authn_request_msg(LassoLogin *login, const gchar *remote_providerID,
|
||||
lassoHttpMethod http_method);
|
||||
|
||||
gint lasso_login_build_authn_response_msg(LassoLogin *login, gint authentication_result,
|
||||
const gchar *authenticationMethod,
|
||||
|
@ -576,10 +576,10 @@ gchar* lasso_login_dump(LassoLogin *login);
|
|||
gint lasso_login_init_authn_request(LassoLogin *login);
|
||||
|
||||
gint lasso_login_init_from_authn_request_msg(LassoLogin *login, gchar *authn_request_msg,
|
||||
lassoHttpMethod authn_request_method);
|
||||
lassoHttpMethod authn_request_http_method);
|
||||
|
||||
gint lasso_login_init_request(LassoLogin *login, gchar *response_msg,
|
||||
lassoHttpMethod response_method);
|
||||
lassoHttpMethod response_http_method);
|
||||
|
||||
gboolean lasso_login_must_authenticate(LassoLogin *login);
|
||||
|
||||
|
|
|
@ -115,7 +115,8 @@ START_TEST(test02_serviceProviderLogin)
|
|||
lasso_lib_authn_request_set_consent(request, lassoLibConsentObtained);
|
||||
relayState = "fake";
|
||||
lasso_lib_authn_request_set_relayState(request, "fake");
|
||||
rc = lasso_login_build_authn_request_msg(spLoginContext, "https://idp1/metadata");
|
||||
rc = lasso_login_build_authn_request_msg(spLoginContext, "https://idp1/metadata",
|
||||
lassoHttpMethodRedirect);
|
||||
fail_unless(rc == 0, "lasso_login_build_authn_request_msg failed");
|
||||
authnRequestUrl = LASSO_PROFILE(spLoginContext)->msg_url;
|
||||
fail_unless(authnRequestUrl != NULL,
|
||||
|
|
Loading…
Reference in New Issue