func getRegistrarServiceUrl()

in sdk/communication/AzureCommunicationChat/Source/Registrar/RegistrarURLSettings.swift [37:49]


func getRegistrarServiceUrl(token: String) throws -> String {
    let jwt = try decode(jwtToken: token)
    if let skypeToken = jwt["skypeid"] as? String {
        if isGcch(id: skypeToken) {
            return gcchRegistrarServiceUrl
        }
        if isDod(id: skypeToken) {
            return dodRegistrarServiceUrl
        }
    }

    return defaultRegistrarServiceUrl
}