Main Content

findAuthentication

R2026b

Find OPC UA servers supporting specified user authentication type

    Description

    matchingServers = findAuthentication(servers,userTokenType) searches the OPC UA servers specified by serverInfo for servers that support the authentication type specified by userTokenType. The matching servers are returned as an array of opc.ua.ServerInfo objects.

    example

    Examples

    collapse all

    Find all servers from the local host that support Username authentication.

    localServers = opcuaserverinfo("localhost");
    userServers = findAuthentication(localServers,"Username")
    userServers =
    
    1×2 OPC UA ServerInfo array:
        index      Description       Hostname Port  Best Message Security Best Channel Security          User Tokens            
        ----- --------------------- --------- ----- --------------------- --------------------- ----------------------------------
          1   SimulationServer0x341 localhost 4841  Sign                  Aes128_Sha256_RsaOaep Anonymous | Username
          2   SimulationServer0x462 localhost 53530 SignAndEncrypt        Aes256_Sha256_RsaPss  Anonymous | Username | Certificate

    Input Arguments

    collapse all

    OPC UA servers to search, specified as an array of opc.ua.ServerInfo objects. For instance, obtain a list of the servers on a specified host using the opcuaserverinfo function.

    User authentication type, specified as a string or character vector. The user authentication types are: Anonymous, Username, and Certificate. For more information, see User Authentication.

    Output Arguments

    collapse all

    List of matching servers, returned as an array of opc.ua.ServerInfo objects.

    Version History

    Introduced in R2015b

    See Also

    Functions