template.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package saml
  15. import api "yunion.io/x/onecloud/pkg/apis/identity"
  16. var (
  17. SAMLTestTemplate = api.SSAMLIdpConfigOptions{
  18. EntityId: "https://samltest.id/saml/idp",
  19. RedirectSSOUrl: "https://samltest.id/idp/profile/SAML2/Redirect/SSO",
  20. SIdpAttributeOptions: api.SIdpAttributeOptions{
  21. UserNameAttribute: "urn:oid:0.9.2342.19200300.100.1.1",
  22. UserIdAttribute: "urn:oid:0.9.2342.19200300.100.1.1",
  23. UserDisplaynameAttribtue: "urn:oid:2.16.840.1.113730.3.1.241",
  24. UserEmailAttribute: "urn:oid:0.9.2342.19200300.100.1.3",
  25. UserMobileAttribute: "urn:oid:2.5.4.20",
  26. },
  27. }
  28. AzureADTemplate = api.SSAMLIdpConfigOptions{
  29. SIdpAttributeOptions: api.SIdpAttributeOptions{
  30. UserNameAttribute: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
  31. UserIdAttribute: "http://schemas.microsoft.com/identity/claims/objectidentifier",
  32. UserDisplaynameAttribtue: "http://schemas.microsoft.com/identity/claims/displayname",
  33. UserEmailAttribute: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
  34. UserMobileAttribute: "",
  35. },
  36. }
  37. )