iOS中idp证书如何给另一台机子使用

先在原电脑上用Xcode->Windows->Organizer, 再点击Developer profile, 在其最下面点击Expore按钮, 再弹出的对话框中输入保存的文件名,密码.

将主机上导出的.develperprofile文件拷贝到另一台机子上, 在这台机子上也用Xcode->Windows->Organizer, 在DEVELOPMENT下点击Developer profile, 在其右边点击Import Develper profile按钮, 将这个.develpoerprofile导入,密码就是第一个步骤里设定的密码.

经测试,开发证书同样可以。


Xcode5 之后的操作步骤是:

Xcode--Preferences--Accounts--


ios开发--多台电脑共用一个开发证书的方法

原文地址:http://blog.csdn.net/liangliang103377/article/details/38557315
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个通过Java使用OpenSAML库实现SAML IDP的简单示例: 1. 首先,你需要添加OpenSAML库的依赖。可以通过在pom.xml文件添加以下代码来实现: ```xml <dependencies> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-core</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-saml-api</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-saml-impl</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-security-api</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-security-impl</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-profile-api</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml-profile-impl</artifactId> <version>3.4.5</version> </dependency> </dependencies> ``` 2. 然后,你需要创建一个SAML IDP的实现类并实现必要的接口和方法。例如: ```java public class SimpleSAMLIDPImpl implements SAMLIDP { private static final Logger logger = LoggerFactory.getLogger(SimpleSAMLIDPImpl.class); // Implement the SAMLIDP interface methods // ... @Override public Response createResponse(Request request) { // Create a new SAML response Response response = new ResponseBuilder().buildObject(); // Set the response ID, issue instant and destination response.setID(SAMLUtils.generateID()); response.setIssueInstant(DateTime.now()); response.setDestination(request.getAssertionConsumerServiceURL()); // Create a new SAML assertion Assertion assertion = new AssertionBuilder().buildObject(); // Set the assertion ID, issue instant and issuer assertion.setID(SAMLUtils.generateID()); assertion.setIssueInstant(DateTime.now()); assertion.setIssuer(SAMLUtils.createIssuer("SimpleSAMLIDP")); // Create a new SAML subject Subject subject = new SubjectBuilder().buildObject(); // Set the subject name identifier and confirmation method NameID nameID = SAMLUtils.createNameID(request.getSubject()); subject.setNameID(nameID); subject.getSubjectConfirmations().add(SAMLUtils.createSubjectConfirmation(request.getSubjectConfirmationMethod())); // Create a new SAML attribute statement AttributeStatement attributeStatement = new AttributeStatementBuilder().buildObject(); // Add some sample attributes attributeStatement.getAttributes().add(SAMLUtils.createAttribute("firstName", "John")); attributeStatement.getAttributes().add(SAMLUtils.createAttribute("lastName", "Doe")); attributeStatement.getAttributes().add(SAMLUtils.createAttribute("email", "john.doe@example.com")); // Add the attribute statement to the assertion assertion.getAttributeStatements().add(attributeStatement); // Add the assertion to the response response.getAssertions().add(assertion); return response; } // ... } ``` 在上面的示例,我们创建了一个名为`SimpleSAMLIDPImpl`的SAML IDP实现类,并实现了`SAMLIDP`接口的`createResponse`方法。该方法返回一个包含SAML响应的`Response`对象,其包含一个SAML断言,其包括一些示例属性。 3. 最后,你需要创建一个用于启动和配置SAML IDP的应用程序。例如: ```java public class SimpleSAMLIDPApp { public static void main(String[] args) throws Exception { // Create a new HTTP server to listen for SAML requests HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0); // Create a new SAML IDP instance SAMLIDP idp = new SimpleSAMLIDPImpl(); // Register a new SAML handler with the server to handle SAML requests server.createContext("/saml", new SAMLServlet(idp)); // Start the server server.start(); // Log a message indicating that the server has started logger.info("SimpleSAMLIDPApp started"); // Wait for the server to stop System.in.read(); // Stop the server server.stop(0); } } ``` 在上面的示例,我们创建了一个名为`SimpleSAMLIDPApp`的应用程序,该应用程序创建一个HTTP服务器,用于监听SAML请求,并注册一个名为`/saml`的URL路径的SAML处理程序。我们还创建了一个名为`SimpleSAMLIDPImpl`的SAML IDP实例,并将其传递给SAML处理程序。最后,我们启动了HTTP服务器,并等待用户从控制台输入任何字符以停止服务器。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值