The client application begins the authentication process by emitting the <request-login> tag element within an <rpc> tag element. In the <request-login> tag element, it encloses the <username> tag element to specify the JUNOS account (username) under which to establish the connection. The account must already be configured on the JUNOScript server machine, as described in Prerequisites for All Access Protocols. You can choose whether or not the application provides the account password as part of the initial tag sequence.
To provide the password along with the username, the application emits the following tag sequence:
<rpc>
<request-login>
<username>username</username>
<challenge-response>password</challenge-response>
</request-login>
</rpc>
This tag sequence is appropriate if the application automates access to routing platform information and does not interact with users, or obtains the password from a user before beginning the authentication process.
To omit the password and specify only the username, the application emits the following tag sequence:
<rpc>
<request-login>
<username>username</username>
</request-login>
</rpc>
This tag sequence is appropriate if the application does not obtain the password until the authentication process has already begun. In this case, the JUNOScript server returns the <challenge> tag element within an <rpc-reply> tag element to request the password associated with the username. The tag element encloses the Password: string, which the client application can forward to the screen as a prompt for a user. The echo="no" attribute in the opening <challenge> tag specifies that the password string typed by the user does not echo on the screen. The tag sequence is as follows:
<rpc-reply xmlns:junos="URL">
<challenge echo="no">Password:</challenge>
</rpc-reply>
The client application obtains the password and emits the following tag sequence to forward it to the JUNOScript server:
<rpc>
<request-login>
<username>username</username>
<challenge-response>password</challenge-response>
</request-login>
</rpc>