/// Make the url to redirect users to when authenticating.
Make the url to redirect users to when authenticating.
Make the url to redirect users to when authenticating .
fn make_authentication_url(req: &HttpRequest, redir_path: String) -> String {
    // Make the redirect url
    let redirect_url = make_redirect_url(&req, redir_path);
    // Url-encode the redirect url in service parameter.
    let encoded: String = serde_urlencoded::to_string(&[("service", redirect_url.as_str())])
        .expect("Could not URL-encode CAS parameters.");
    // Build the CAS URL.
    return format!("{}/login?{}", RPI_CAS_ENDPOINT, encoded);
}
fn make_authentication_url ( req : & HttpRequest , redir_path : String ) -> String { // Make the redirect url let redirect_url = make_redirect_url ( & req , redir_path ) ; // Url-encode the redirect url in service parameter. let encoded : String = serde_urlencoded :: to_string ( & [ ( " " , redirect_url . as_str ( ) ) ] ) . expect ( " " ) ; // Build the CAS URL. return format ! ( " " RPI_CAS_ENDPOINT encoded ) ; }
Make the url to redirect users to when authenticating.
Make the url to redirect users to when authenticating .
req
&HttpRequest
redir_path
String