File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,24 @@ export class AuthInterceptor implements HttpInterceptor {
129129 */
130130 private sortAuthMethods ( authMethodModels : AuthMethod [ ] ) : AuthMethod [ ] {
131131 const sortedAuthMethodModels : AuthMethod [ ] = [ ] ;
132+ let passwordAuthFound = false ;
133+ let ldapAuthFound = false ;
134+
132135 authMethodModels . forEach ( ( method ) => {
133136 if ( method . authMethodType === AuthMethodType . Password ) {
134137 sortedAuthMethodModels . push ( method ) ;
138+ passwordAuthFound = true ;
139+ }
140+ if ( method . authMethodType === AuthMethodType . Ldap ) {
141+ ldapAuthFound = true ;
135142 }
136143 } ) ;
137144
145+ // Using password authentication method to provide UI for LDAP authentication even if password auth is not present in server
146+ if ( ldapAuthFound && ! ( passwordAuthFound ) ) {
147+ sortedAuthMethodModels . push ( new AuthMethod ( AuthMethodType . Password , 0 ) ) ;
148+ }
149+
138150 authMethodModels . forEach ( ( method ) => {
139151 if ( method . authMethodType !== AuthMethodType . Password ) {
140152 sortedAuthMethodModels . push ( method ) ;
You can’t perform that action at this time.
0 commit comments