Manager.HaveConsent
Manager.HaveConsent
The HaveConsent method returns a Boolean value indicating whether a user has consent for purposes of Microsoft® Kids Passport authentication.
Syntax
Function PassportManager.HaveConsent(bNeedFullConsent,bNeedBirthdate) As Boolean
Parameters
- bNeedFullConsent
Should be set to True to indicate full consent is required for Microsoft® .NET Passport authentication.
- bNeedBirthdate
Should be set to True to indicate the user's birth date is required for .NET Passport authentication. This will cause HaveConsent to return False if BDay_precision is 0 (indicating that the users birth date is not specified) or 3 (indicating that the user has specified the legacy under 18 setting).
Return values
The return value is True if the user is not subject to consent or if consent has been granted. The return value is False if the user is subject to consent and does not have consent.
Example
The following Microsoft Visual Basic Scripting Edition (VBScript) code snippet uses the HaveConsent method to display a warning message to the user.
... Dim oMgr Set oMgr = Server.CreateObject("Passport.Manager") If oMgr.HasProfile("core") Then If oMgr.HaveConsent(True,True) Then Response.Write ("<br>You are an adult (consent does not apply), or you are a child with full consent who has specified a birth date.") ElseIf oMgr.HaveConsent(False,True) Then Response.Write ("<br>You are a child with limited consent who has specified a birth date.") ElseIf oMgr.HaveConsent(True,False) Then Response.Write ("<br>You are a child with full consent, but you have not specified a birth date.") ElseIf oMgr.HaveConsent(False,False) Then Response.Write ("<br>You are a child with limited consent, but you have not specified a birth date.") Else Response.Write ("<br>You are a child who does not have consent.") End If ...
Remarks
Consent is defined as parental consent to collect, use, or share personal information given to a particular Web site by a minor under 13 who is a resident of the United States or its territories or under 14 and a resident of Korea.
Consent must first be established for .NET Passport as a distinct entity, and then can be established on a site-by-site basis for each participating site. Kids Passport divides parental consent into two categories, as defined by the Children's Online Privacy Protection Act (COPPA):
- Limited consent
Limited consent is consent to collect personal information from children under 13 and to share it with third parties "as necessary to operate a Company's Web site."- Full consent
Full consent is consent to collect personal information from children under 13 and share that information with other sites or companies.Microsoft .NET Passport provides the ability for parents to manage which information about their children is shared with Kids Passport participating sites, to grant full or limited consent, or to deny consent. The HaveConsent method indicates whether a user has consent based on the contents of the Consent cookie or the birth date as stored in the Profile cookie.
See Also