ClassRefs returns the requested authentication context classes: the values of AuthnContextClassRefs if it is set, otherwise AuthnContextClassRef, if that is set.
()
| 41 | // values of AuthnContextClassRefs if it is set, otherwise |
| 42 | // AuthnContextClassRef, if that is set. |
| 43 | func (r *RequestedAuthnContext) ClassRefs() []string { |
| 44 | if len(r.AuthnContextClassRefs) > 0 { |
| 45 | return r.AuthnContextClassRefs |
| 46 | } |
| 47 | if r.AuthnContextClassRef != "" { |
| 48 | return []string{r.AuthnContextClassRef} |
| 49 | } |
| 50 | return nil |
| 51 | } |
| 52 | |
| 53 | // Element returns an etree.Element representing the object in XML form. |
| 54 | func (r *RequestedAuthnContext) Element() *etree.Element { |
no outgoing calls