-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_basic_authentication_ext.go
35 lines (26 loc) · 1.24 KB
/
model_basic_authentication_ext.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package jossoappi
func (ba BasicAuthenticationDTO) ToAuthnMechansim() (*AuthenticationMechanismDTO, error) {
m := NewAuthenticationMechanismDTO()
m.SetName(ba.GetName())
m.SetDisplayName(ba.GetDisplayName())
m.SetPriority(ba.GetPriority())
m.AdditionalProperties = make(map[string]interface{})
m.AdditionalProperties["@c"] = ".BasicAuthenticationDTO"
m.AdditionalProperties["enabled"] = ba.GetEnabled()
m.AdditionalProperties["hashAlgorithm"] = ba.GetHashAlgorithm()
m.AdditionalProperties["hashEncoding"] = ba.GetHashEncoding()
m.AdditionalProperties["ignoreUsernamecase"] = ba.GetIgnoreUsernameCase()
m.AdditionalProperties["ignorePassowordCase"] = ba.GetIgnorePasswordCase()
m.AdditionalProperties["saltLength"] = ba.GetSaltLength()
m.AdditionalProperties["saltPrefix"] = ba.GetSaltPrefix()
m.AdditionalProperties["saltSuffix"] = ba.GetSaltSuffix()
//authn.AdditionalProperties["impersonateUserPolicy"]
m.AdditionalProperties["simpleAuthnSaml2AuthnCtxClass"] = ba.GetSimpleAuthnSaml2AuthnCtxClass()
return m, nil
}
func NewBasicAuthenticationDTOInit() *BasicAuthenticationDTO {
ba := NewBasicAuthenticationDTO()
ba.AdditionalProperties = make(map[string]interface{})
ba.AdditionalProperties["@c"] = ".BasicAuthenticationDTO"
return ba
}