CHAPTER 9
Using APIs for Authentication
This chapter shows how to use the NSM APIs to log into and log out of the system.
This chapter contains the following sections:
•
Login on page 95
•
Logout on page 96
Login
This API sample code shows how to log into the NSM server.
/**
* Prerequisite:
*
* @throws Exception
*/
public void setUp() throws Exception {
if (PolicyAssignmentTest.setUpDone) return;
Properties properties = null;
webDir = System.getProperty("WEBDIR");
if (webDir == null) {
webDir = System.getProperty("user.dir") + File.sep "..";
System.err.println("WEBDIR is not defined, using the default one " +
webDir);
}
File argsCandidate = new File( File.sep "client" +
File.sep "Properties.txt");
if (null != argsCandidate) {
properties = new Properties();
FileInputStream fin = new FileInputStream(argsCandidate);
properties.load(fin);
fin.close();
}
String trustStore = (String) properties.get("javax.net.ssl.trustStore");
String trustStorePath = File.sep trustStore.replace('/',
File.separatorChar);
95
Copyright © 2010, Juniper Networks, Inc.
Содержание NETWORK AND SECURITY MANAGER 2010.4 - API GUIDE REV 1
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 10: ...Copyright 2010 Juniper Networks Inc x Network and Security Manager 2010 4 API Guide...
Страница 12: ...Copyright 2010 Juniper Networks Inc xii Network and Security Manager 2010 4 API Guide...
Страница 20: ...Copyright 2010 Juniper Networks Inc 2 Network and Security Manager 2010 4 API Guide...
Страница 24: ...Copyright 2010 Juniper Networks Inc 6 Network and Security Manager 2010 4 API Guide...
Страница 34: ...Copyright 2010 Juniper Networks Inc 16 Network and Security Manager 2010 4 API Guide...
Страница 58: ...Figure 10 IDP Rulebase Copyright 2010 Juniper Networks Inc 40 Network and Security Manager 2010 4 API Guide...
Страница 92: ...Copyright 2010 Juniper Networks Inc 74 Network and Security Manager 2010 4 API Guide...
Страница 98: ...Copyright 2010 Juniper Networks Inc 80 Network and Security Manager 2010 4 API Guide...
Страница 100: ...Copyright 2010 Juniper Networks Inc 82 Network and Security Manager 2010 4 API Guide...
Страница 112: ...Copyright 2010 Juniper Networks Inc 94 Network and Security Manager 2010 4 API Guide...
Страница 128: ...Copyright 2010 Juniper Networks Inc 110 Network and Security Manager 2010 4 API Guide...
Страница 138: ...Copyright 2010 Juniper Networks Inc 120 Network and Security Manager 2010 4 API Guide...
Страница 152: ...Copyright 2010 Juniper Networks Inc 134 Network and Security Manager 2010 4 API Guide...
Страница 165: ...PART 6 Index Index on page 149 147 Copyright 2010 Juniper Networks Inc...
Страница 166: ...Copyright 2010 Juniper Networks Inc 148 Network and Security Manager 2010 4 API Guide...