File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,12 +116,24 @@ export class AuthInterceptor implements HttpInterceptor {
116116 */
117117 private sortAuthMethods ( authMethodModels : AuthMethod [ ] ) : AuthMethod [ ] {
118118 const sortedAuthMethodModels : AuthMethod [ ] = [ ] ;
119+ let passwordAuthFound = false ;
120+ let ldapAuthFound = false ;
121+
119122 authMethodModels . forEach ( ( method ) => {
120123 if ( method . authMethodType === AuthMethodType . Password ) {
121124 sortedAuthMethodModels . push ( method ) ;
125+ passwordAuthFound = true ;
126+ }
127+ if ( method . authMethodType === AuthMethodType . Ldap ) {
128+ ldapAuthFound = true ;
122129 }
123130 } ) ;
124131
132+ // Using password authentication method to provide UI for LDAP authentication even if password auth is not present in server
133+ if ( ldapAuthFound && ! ( passwordAuthFound ) ) {
134+ sortedAuthMethodModels . push ( new AuthMethod ( AuthMethodType . Password , 0 ) ) ;
135+ }
136+
125137 authMethodModels . forEach ( ( method ) => {
126138 if ( method . authMethodType !== AuthMethodType . Password ) {
127139 sortedAuthMethodModels . push ( method ) ;
You can’t perform that action at this time.
0 commit comments