use*_*610 1 saml-2.0 spring-boot okta
我在我的应用程序中使用okta作为idp,我想配置自定义属性,例如:ID,如何在okta中完成?以及如何在okta中设置这些值?
小智 5
以下是向Okta的SAML断言添加自定义属性的过程:
在测试应用程序时,您应该获得以下SAML AttributeStatement节点:
<saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Attribute Name="firstName"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"
>Isaac</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="lastName"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"
>Brock</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="Email"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"
>isaac.brock@mailinator.com</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="userName"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"
>isaac@company.com</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="phone"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"
>+1 415 456 7893</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="jobTitle"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
>
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"
>Vice President</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
Run Code Online (Sandbox Code Playgroud)
(注意最后一个"jobTitle"属性)
我希望这有帮助!
| 归档时间: |
|
| 查看次数: |
1216 次 |
| 最近记录: |