#
# This LDIF creates the needed schema objects for Access Grant support in LDAP.
#
# If any changes are made to the attribute names, the corresponding "pingfederate/server/default/data/config-store/org.sourceid.oauth20.token.AccessGrantManagerLDAPADImpl.xml" 
# must also be altered to reflect these changes.
#

#
# Create an AccessGrants OU to store them all. This is an optional OU to keep all access grants in
# the same location. If a different location is needed for them, alter the LDIF. Your search base
# in the "pingfederate/server/default/data/config-store/org.sourceid.oauth20.token.AccessGrantManagerLDAPADImpl.xml" file should point to
# this OU. eg.  <c:item name="SearchBase">OU=AccessGrants,DC=4s8i6q,DC=global</c:item>
#
# <Your Location> should be changed to the location of your full DN for schemas. eg. CN=Schema,CN=Configuration,DC=4s8i6q,DC=global
# <Your DC Here> should be changed to the location of your full DC. eg. DC=4s8i6q,DC=global

dn: OU=AccessGrants,<Your DC Here>
changetype: add
objectClass: top
objectClass: organizationalUnit
ou: AccessGrants
distinguishedName: OU=AccessGrants,<Your DC Here>
instanceType: 4
name: AccessGrants
objectCategory: 
 CN=Organizational-Unit,<Your Location>

#
# These are the required attributes. You may alter the name of the attributes, but in doing
# so you must also change their corresponding values in "pingfederate/server/default/data/config-store/org.sourceid.oauth20.token.AccessGrantManagerLDAPADImpl.xml"  
# to match, and change the "mayContain" and "mustContain" attribute names in the "accessGrant" objectClass in 
# pingfederate/server/default/conf/access-grant/ldif-scripts/access-grant-ldap-active-directory.ldif.
#

dn: CN=accessGrantAttributes,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantAttributes
distinguishedName: 
 CN=accessGrantAttributes,<Your Location>
instanceType: 4
attributeID: 1.3.6.1.4.1.28867.9.2.1 
attributeSyntax: 2.5.5.12
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 4194304
showInAdvancedViewOnly: TRUE
oMSyntax: 64


dn: CN=accessGrantContextualQualifier,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantContextualQualifier
distinguishedName: 
 CN=accessGrantContextualQualifier,<Your Location>
instanceType: 4
attributeID: 1.3.6.1.4.1.28867.9.2.2
attributeSyntax: 2.5.5.10
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 64
showInAdvancedViewOnly: TRUE
oMSyntax: 4

dn: CN=accessGrantClientId,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantClientId
distinguishedName: CN=accessGrantClientId,<Your Location>
instanceType: 4
searchFlags: 1
attributeID: 1.3.6.1.4.1.28867.9.2.3
attributeSyntax: 2.5.5.10
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 256
showInAdvancedViewOnly: TRUE
oMSyntax: 4

dn: CN=accessGrantExpires,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantExpires
distinguishedName: CN=accessGrantExpires,<Your Location>
instanceType: 4
searchFlags: 1
attributeID: 1.3.6.1.4.1.28867.9.2.4
attributeSyntax: 2.5.5.16
isSingleValued: TRUE
showInAdvancedViewOnly: TRUE
oMSyntax: 65


dn: CN=accessGrantGuid,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantGuid
distinguishedName: CN=accessGrantGuid,<Your Location>
instanceType: 4
searchFlags: 1
attributeID: 1.3.6.1.4.1.28867.9.2.5
attributeSyntax: 2.5.5.10
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 32
showInAdvancedViewOnly: TRUE
oMSyntax: 4


dn: CN=accessGrantGrantType,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantGrantType
distinguishedName: CN=accessGrantGrantType,<Your Location>
instanceType: 4
searchFlags: 1
attributeID: 1.3.6.1.4.1.28867.9.2.6
attributeSyntax: 2.5.5.12
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 128
showInAdvancedViewOnly: TRUE
oMSyntax: 64

dn: CN=accessGrantHashedRefreshTokenValue,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantHashedRefreshTokenValue
distinguishedName: 
 CN=accessGrantHashedRefreshTokenValue,<Your Location>
instanceType: 4
searchFlags: 1
attributeID: 1.3.6.1.4.1.28867.9.2.7
attributeSyntax: 2.5.5.10
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 256
uSNChanged: 12799
showInAdvancedViewOnly: TRUE
oMSyntax: 4


dn: CN=accessGrantIssued,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantIssued
distinguishedName: CN=accessGrantIssued,<Your Location>
instanceType: 4
attributeID: 1.3.6.1.4.1.28867.9.2.8
attributeSyntax: 2.5.5.16
isSingleValued: TRUE
showInAdvancedViewOnly: TRUE
oMSyntax: 65

dn: CN=accessGrantScope,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantScope
distinguishedName: CN=accessGrantScope,<Your Location>
instanceType: 4
attributeID: 1.3.6.1.4.1.28867.9.2.9
attributeSyntax: 2.5.5.10
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 1024
showInAdvancedViewOnly: TRUE
oMSyntax: 4


dn: CN=accessGrantUniqueUserIdentifier,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantUniqueUserIdentifier
distinguishedName: 
 CN=accessGrantUniqueUserIdentifier,<Your Location>
instanceType: 4
searchFlags: 1
attributeID: 1.3.6.1.4.1.28867.9.2.10
attributeSyntax: 2.5.5.10
isSingleValued: TRUE
rangeLower: 0
rangeUpper: 256
showInAdvancedViewOnly: TRUE
oMSyntax: 4



dn: CN=accessGrantUpdated,<Your Location>
changetype: add
objectClass: top
objectClass: attributeSchema
cn: accessGrantUpdated
distinguishedName: CN=accessGrantUpdated,<Your Location>
instanceType: 4
attributeID: 1.3.6.1.4.1.28867.9.2.11 
attributeSyntax: 2.5.5.16
isSingleValued: TRUE
uSNChanged: 12812
showInAdvancedViewOnly: TRUE
oMSyntax: 65

