initial version
This commit is contained in:
parent
74a963be6a
commit
bc1c8677f4
|
@ -0,0 +1,34 @@
|
|||
#include <lasso/protocols/federation_termination_notification.h>
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_federationTerminationNotification(LassoNode *request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LassoNode *lasso_build_federationTerminationNotification(const char *metadata,
|
||||
LassoNode *nameIdentifier,
|
||||
const char *consent)
|
||||
{
|
||||
LassoNode *notification;
|
||||
|
||||
notification = lasso_lib_federation_termination_notification_new();
|
||||
|
||||
lasso_samlp_request_abstract_set_requestID(LASSO_SAMLP_REQUEST_ABSTRACT(notification),
|
||||
(const xmlChar *)lasso_build_unique_id(32));
|
||||
lasso_samlp_request_abstract_set_minorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(notification),
|
||||
lassoLibMinorVersion);
|
||||
lasso_samlp_request_abstract_set_issueInstance(LASSO_SAMLP_REQUEST_ABSTRACT(notification),
|
||||
lasso_get_current_time());
|
||||
lasso_samlp_request_abstract_set_majorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(notification),
|
||||
lassoLibMajorVersion);
|
||||
|
||||
lasso_lib_federation_termination_notification_set_providerID(LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(notification), "badproviderid.com"); // FIXME
|
||||
|
||||
lasso_lib_federation_termination_notification_set_nameIdentifier(LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(notification), nameIdentifier);
|
||||
|
||||
if(consent){
|
||||
lasso_lib_federation_termination_notification_set_consent(LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(notification), consent);
|
||||
}
|
||||
|
||||
return(notification);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Author: Valery Febvre <vfebvre@easter-eggs.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Templ
|
||||
e Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __FEDERATION_TERMINATION_NOTIFICATION_H__
|
||||
#define __FEDERATION_TERMINATION_NOTIFICATION_H__
|
||||
|
||||
#include <lasso/lasso.h>
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_federationTerminationNotification(LassoNode *);
|
||||
|
||||
LassoNode *lasso_build_federationTerminationNotification(const char *metadata,
|
||||
LassoNode *nameIdentifier,
|
||||
const char *consent);
|
||||
|
||||
#endif /* __FEDERATION_TERMINATION_NOTIFICATION_H__ */
|
|
@ -0,0 +1,86 @@
|
|||
#include <lasso/protocols/logout.h>
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_logoutRequest(LassoNode *request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LassoNode *lasso_build_logoutRequest(const char *metadata,
|
||||
LassoNode *nameIdentifier,
|
||||
const char *sessionIndex,
|
||||
const char *relayState,
|
||||
const char *consent)
|
||||
{
|
||||
LassoNode *request;
|
||||
|
||||
request = lasso_lib_logout_request_new();
|
||||
|
||||
lasso_samlp_request_abstract_set_requestID(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
(const xmlChar *)lasso_build_unique_id(32));
|
||||
lasso_samlp_request_abstract_set_minorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
lassoLibMinorVersion);
|
||||
lasso_samlp_request_abstract_set_issueInstance(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
lasso_get_current_time());
|
||||
lasso_samlp_request_abstract_set_majorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
lassoLibMajorVersion);
|
||||
|
||||
lasso_lib_logout_request_set_providerID(LASSO_LIB_LOGOUT_REQUEST(request),
|
||||
"badproviderid.com"); // FIXME
|
||||
|
||||
lasso_lib_logout_request_set_nameIdentifier(LASSO_LIB_LOGOUT_REQUEST(request), nameIdentifier);
|
||||
|
||||
if(sessionIndex){
|
||||
lasso_lib_logout_request_set_sessionIndex(LASSO_LIB_LOGOUT_REQUEST(request), sessionIndex);
|
||||
}
|
||||
|
||||
if(relayState){
|
||||
lasso_lib_logout_request_set_relayState(LASSO_LIB_LOGOUT_REQUEST(request),
|
||||
relayState);
|
||||
}
|
||||
|
||||
if(consent){
|
||||
lasso_lib_logout_request_set_consent(LASSO_LIB_LOGOUT_REQUEST(request), consent);
|
||||
}
|
||||
|
||||
return(request);
|
||||
|
||||
}
|
||||
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_logoutResponse(LassoNode *response)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LassoNode *lasso_build_logoutResponse(LassoNode *request,
|
||||
const char *statusCodeValue,
|
||||
const char *relayState)
|
||||
{
|
||||
LassoNode *response, *ss, *ssc;
|
||||
|
||||
response = lasso_lib_logout_response_new();
|
||||
|
||||
lasso_samlp_response_abstract_set_responseID(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
(const xmlChar *)lasso_build_unique_id(32));
|
||||
lasso_samlp_response_abstract_set_minorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
lassoLibMinorVersion);
|
||||
lasso_samlp_response_abstract_set_majorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
lassoLibMajorVersion);
|
||||
lasso_samlp_response_abstract_set_issueInstance(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
lasso_get_current_time());
|
||||
|
||||
lasso_lib_status_response_set_providerID(LASSO_LIB_STATUS_RESPONSE(response),
|
||||
"badproviderid.com"); // FIXME
|
||||
|
||||
ss = lasso_samlp_status_new();
|
||||
ssc = lasso_samlp_status_code_new();
|
||||
lasso_samlp_status_code_set_value(LASSO_SAMLP_STATUS_CODE(ssc), statusCodeValue);
|
||||
lasso_samlp_status_set_statusCode(LASSO_SAMLP_STATUS(ss), LASSO_SAMLP_STATUS_CODE(ssc));
|
||||
lasso_samlp_response_set_status(LASSO_SAMLP_RESPONSE(response), LASSO_SAMLP_STATUS(ss));
|
||||
|
||||
if(relayState){
|
||||
lasso_lib_status_response_set_relayState(LASSO_LIB_STATUS_RESPONSE(response), relayState);
|
||||
}
|
||||
|
||||
return(response);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef __LOGOUT_H__
|
||||
#define __LOGOUT_H__
|
||||
|
||||
#include <lasso/lasso.h>
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_logoutRequest(LassoNode *);
|
||||
|
||||
LassoNode *lasso_build_logoutRequest(const char *metadata,
|
||||
LassoNode *nameIdentifier,
|
||||
const char *sessionIndex,
|
||||
const char *relayState,
|
||||
const char *consent);
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_logoutResponse(LassoNode *);
|
||||
|
||||
LassoNode *lasso_build_logoutResponse(LassoNode *request,
|
||||
const char*codeValue,
|
||||
const char*relayState);
|
||||
|
||||
#endif /* __LOGOUT_H__ */
|
|
@ -0,0 +1,38 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Author: Valery Febvre <vfebvre@easter-eggs.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_PROTOCOLS_H__
|
||||
#define __LASSO_PROTOCOLS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <lasso/protocols/single_sign_on_and_federation.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_PROTOCOLS_H__ */
|
|
@ -0,0 +1,81 @@
|
|||
#include <lasso/protocols/register_name_identifier.h>
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_registerNameIdentifierRequest(LassoNode *request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LassoNode *lasso_build_registerNameIdentifierRequest(const char *metadata,
|
||||
LassoNode *idpProvidedNameIdentifer,
|
||||
LassoNode *spProvidedNameIdentifier,
|
||||
LassoNode *oldProvidedNameIdentifier,
|
||||
const char *relayState)
|
||||
{
|
||||
LassoNode *request;
|
||||
|
||||
request = lasso_lib_register_name_identifier_request_new();
|
||||
|
||||
lasso_samlp_request_abstract_set_requestID(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
(const xmlChar *)lasso_build_unique_id(32));
|
||||
lasso_samlp_request_abstract_set_minorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
lassoLibMinorVersion);
|
||||
lasso_samlp_request_abstract_set_issueInstance(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
lasso_get_current_time());
|
||||
lasso_samlp_request_abstract_set_majorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request),
|
||||
lassoLibMajorVersion);
|
||||
|
||||
lasso_lib_register_name_identifier_request_set_providerID(LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(
|
||||
request),
|
||||
"badproviderid.com"); // FIXME
|
||||
|
||||
lasso_lib_register_name_identifier_request_set_idp_provided_name_identifier(LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(request), idpProvidedNameIdentifer);
|
||||
|
||||
lasso_lib_register_name_identifier_request_set_sp_provided_name_identifier(LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(request), spProvidedNameIdentifier);
|
||||
|
||||
lasso_lib_register_name_identifier_request_set_old_provided_name_identifier(LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(request), oldProvidedNameIdentifier);
|
||||
|
||||
if(relayState){
|
||||
lasso_lib_register_name_identifier_request_set_relayState(LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(request), relayState);
|
||||
}
|
||||
|
||||
return(request);
|
||||
|
||||
}
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_registerNameIdentifierResponse(LassoNode *response)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LassoNode *lasso_build_registerNameIdentifierResponse(LassoNode *response,
|
||||
const char *statusCodeValue,
|
||||
const char *relayState)
|
||||
{
|
||||
LassoNode *response, *ss, *ssc;
|
||||
|
||||
response = lasso_lib_register_name_identifier_response_new();
|
||||
|
||||
lasso_samlp_response_abstract_set_responseID(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
(const xmlChar *)lasso_build_unique_id(32));
|
||||
lasso_samlp_response_abstract_set_minorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
lassoLibMinorVersion);
|
||||
lasso_samlp_response_abstract_set_majorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
lassoLibMajorVersion);
|
||||
lasso_samlp_response_abstract_set_issueInstance(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
|
||||
lasso_get_current_time());
|
||||
|
||||
lasso_lib_status_response_set_providerID(LASSO_LIB_STATUS_RESPONSE(response),
|
||||
"badproviderid.com"); // FIXME
|
||||
|
||||
ss = lasso_samlp_status_new();
|
||||
ssc = lasso_samlp_status_code_new();
|
||||
lasso_samlp_status_code_set_value(LASSO_SAMLP_STATUS_CODE(ssc), statusCodeValue);
|
||||
lasso_samlp_status_set_statusCode(LASSO_SAMLP_STATUS(ss), LASSO_SAMLP_STATUS_CODE(ssc));
|
||||
lasso_samlp_response_set_status(LASSO_SAMLP_RESPONSE(response), LASSO_SAMLP_STATUS(ss));
|
||||
|
||||
if(relayState){
|
||||
lasso_lib_status_response_set_relayState(LASSO_LIB_STATUS_RESPONSE(response), relayState);
|
||||
}
|
||||
|
||||
return(response);
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef __REGISTER_NAME_IDENTIFIER_H__
|
||||
#define __REGISTER_NAME_IDENTIFIER_H__
|
||||
|
||||
#include <lasso/lasso.h>
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_registerNameIdentifierRequest(LassoNode *);
|
||||
|
||||
LassoNode *lasso_build_registerNameIdentifierRequest(const char *metadata,
|
||||
LassoNode *idpProvidedNameIdentifer,
|
||||
LassoNode *spProvidedNameIdentifier,
|
||||
LassoNode *oldProvidedNameIdentifier,
|
||||
const char *relayState);
|
||||
|
||||
xmlChar *lasso_build_url_encoded_message_registerNameIdentifierResponse(LassoNode *);
|
||||
|
||||
LassoNode *lasso_build_registerNameIdentifierResponse(LassoNode *request,
|
||||
const char*codeValue,
|
||||
const char*relayState);
|
||||
|
||||
|
||||
#endif /* __REGISTER_NAME_IDENTIFIER_H__ */
|
Loading…
Reference in New Issue