(name, realmDelimiter)
| 130 | }; |
| 131 | |
| 132 | function splitPrincipal(name, realmDelimiter) { |
| 133 | const parts = [null, name]; |
| 134 | if (!realmDelimiter) { |
| 135 | return parts; |
| 136 | } |
| 137 | const index = name.indexOf(realmDelimiter); |
| 138 | if (index !== -1) { |
| 139 | parts[0] = name.substring(0, index); |
| 140 | parts[1] = name.substring(index + realmDelimiter.length); |
| 141 | } |
| 142 | return parts; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Normalize the credentials |
no outgoing calls
no test coverage detected
searching dependent graphs…