GetLocalUserCredentials returns the local user credentials.
()
| 1429 | |
| 1430 | // GetLocalUserCredentials returns the local user credentials. |
| 1431 | func (a *Agent) GetLocalUserCredentials() (frag string, pwd string, err error) { |
| 1432 | valSet := make(chan struct{}) |
| 1433 | err = a.loop.Run(a.loop, func(_ context.Context) { |
| 1434 | frag = a.localUfrag |
| 1435 | pwd = a.localPwd |
| 1436 | close(valSet) |
| 1437 | }) |
| 1438 | |
| 1439 | if err == nil { |
| 1440 | <-valSet |
| 1441 | } |
| 1442 | |
| 1443 | return |
| 1444 | } |
| 1445 | |
| 1446 | // GetRemoteUserCredentials returns the remote user credentials. |
| 1447 | func (a *Agent) GetRemoteUserCredentials() (frag string, pwd string, err error) { |