1 /* $Id$ 2 * 3 * Lasso - A free implementation of the Liberty Alliance specifications. 4 * 5 * Copyright (C) 2004-2007 Entr'ouvert 6 * http://lasso.entrouvert.org 7 * 8 * Authors: See AUTHORS file in top-level directory. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, see <http://www.gnu.org/licenses/>. 22 */ 23 24 #ifndef __LASSO_LIB_AUTHN_REQUEST_H__ 25 #define __LASSO_LIB_AUTHN_REQUEST_H__ 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif /* __cplusplus */ 30 31 #include "samlp_request_abstract.h" 32 #include "lib_request_authn_context.h" 33 #include "lib_scoping.h" 34 35 #define LASSO_TYPE_LIB_AUTHN_REQUEST (lasso_lib_authn_request_get_type()) 36 #define LASSO_LIB_AUTHN_REQUEST(obj) \ 37 (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_LIB_AUTHN_REQUEST, LassoLibAuthnRequest)) 38 #define LASSO_LIB_AUTHN_REQUEST_CLASS(klass) \ 39 (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_LIB_AUTHN_REQUEST, LassoLibAuthnRequestClass)) 40 #define LASSO_IS_LIB_AUTHN_REQUEST(obj) \ 41 (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_LIB_AUTHN_REQUEST)) 42 #define LASSO_IS_LIB_AUTHN_REQUEST_CLASS(klass) \ 43 (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_LIB_AUTHN_REQUEST)) 44 #define LASSO_LIB_AUTHN_REQUEST_GET_CLASS(o) \ 45 (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LIB_AUTHN_REQUEST, LassoLibAuthnRequestClass)) 46 47 typedef struct _LassoLibAuthnRequest LassoLibAuthnRequest; 48 typedef struct _LassoLibAuthnRequestClass LassoLibAuthnRequestClass; 49 50 /** 51 * LassoLibAuthnRequest: 52 * 53 * @ProviderID isthe service provider identifier, this field will often be 54 * filled with lasso_login_init_authn_request() 55 * 56 * @nameIDPolicy tells the identity provider about the policy to use for 57 * federation; it must be one of #LASSO_LIB_NAMEID_POLICY_TYPE_NONE, 58 * #LASSO_LIB_NAMEID_POLICY_TYPE_ONE_TIME, 59 * #LASSO_LIB_NAMEID_POLICY_TYPE_FEDERATED or 60 * #LASSO_LIB_NAMEID_POLICY_TYPE_ANY. 61 * 62 * @IsPassive; if %TRUE (default) it tells the identity provider not to 63 * interact with the user. 64 * 65 * @ForceAuthn; only used if @IsPassive is %FALSE, it tells the identity 66 * provider to force authentication of the user even when already 67 * authenticated. 68 * 69 * @ProtocolProfile is the Single Sign-On and Federation profile to adopt; 70 * either #LASSO_LIB_PROTOCOL_PROFILE_BRWS_ART (which is the default value) 71 * or #LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST. 72 * 73 */ 74 struct _LassoLibAuthnRequest { 75 LassoSamlpRequestAbstract parent; 76 77 /*< public >*/ 78 /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ 79 GList *Extension; /* of xmlNode* */ 80 /* <xs:element ref="ProviderID"/> */ 81 char *ProviderID; 82 /* <xs:element ref="AffiliationID" minOccurs="0"/> */ 83 char *AffiliationID; 84 /* <xs:element ref="NameIDPolicy" minOccurs="0"/> */ 85 char *NameIDPolicy; 86 /* <xs:element name="ForceAuthn" type="xs:boolean" minOccurs="0"/> */ 87 gboolean ForceAuthn; 88 /* <xs:element name="IsPassive" type="xs:boolean "minOccurs="0"/> */ 89 gboolean IsPassive; 90 /* <xs:element ref="ProtocolProfile" minOccurs="0"/> */ 91 char *ProtocolProfile; 92 /* <xs:element name="AssertionConsumerServiceID" type="xs:string" minOccurs="0"/> */ 93 char *AssertionConsumerServiceID; 94 /* <xs:element ref="RequestAuthnContext" minOccurs="0"/> */ 95 LassoLibRequestAuthnContext *RequestAuthnContext; 96 /* <xs:element ref="RelayState" minOccurs="0"/> */ 97 char *RelayState; 98 /* <xs:element ref="Scoping" minOccurs="0 "/> */ 99 LassoLibScoping *Scoping; 100 /* <xs:attribute ref="consent" use="optional"/> */ 101 char *consent; 102 }; 103 104 struct _LassoLibAuthnRequestClass { 105 LassoSamlpRequestAbstractClass parent; 106 }; 107 108 LASSO_EXPORT GType lasso_lib_authn_request_get_type(void); 109 LASSO_EXPORT LassoLibAuthnRequest* lasso_lib_authn_request_new(void); 110 111 #ifdef __cplusplus 112 } 113 #endif /* __cplusplus */ 114 115 #endif /* __LASSO_LIB_AUTHN_REQUEST_H__ */ 116