本文整理了Java中org.jclouds.openstack.keystone.v2_0.domain.Token.getId()
方法的一些代码示例,展示了Token.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Token.getId()
方法的具体详情如下:
包路径:org.jclouds.openstack.keystone.v2_0.domain.Token
类名称:Token
方法名:getId
[英]When providing an ID, it is assumed that the token exists in the current OpenStack deployment
[中]在提供ID时,假定令牌存在于当前OpenStack部署中
代码示例来源:origin: stackoverflow.com
public void onSuccess(Token token) {
com.stripe.model.Token stripeToken = com.stripe.model.Token.retrieve(token.getId(), publishableKey);
com.stripe.model.Card stripeCard = stripeToken.getCard();
if (stripeCard.getFunding().equals("prepaid") {
// Reject card
}
}
代码示例来源:origin: org.apache.jclouds.api/openstack-keystone
@Override
public String getAuthToken() {
return token.getId();
}
代码示例来源:origin: apache/jclouds
@Override
public String getAuthToken() {
return token.getId();
}
代码示例来源:origin: stackoverflow.com
private void createCustomer(Token token) {
Map<String, Object> params = new HashMap<>();
params.put("token", token.getId());
代码示例来源:origin: Nextdoor/bender
@Override
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: org.jclouds.api/openstack-keystone
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: com.amysta.jclouds.api/openstack-keystone
@Override
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: jclouds/legacy-jclouds
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-keystone
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: stackoverflow.com
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";
Map<String, Object> tokenParams = new HashMap<String, Object>();
Map<String, Object> bank_accountParams = new HashMap<String, Object>();
bank_accountParams.put("country", "US");
bank_accountParams.put("currency", "usd");
bank_accountParams.put("account_holder_name", "Jane Austen");
bank_accountParams.put("account_holder_type", "individual");
bank_accountParams.put("routing_number", "11000000");
bank_accountParams.put("account_number", "000123456789");
tokenParams.put("bank_account", bank_accountParams);
try {
Token s = Token.create(tokenParams);
Log.d("Token",s.getId());
} catch (AuthenticationException e) {
showAlertMessage("",e.getMessage());
} catch (CardException e) {
showAlertMessage("",e.getMessage());
} catch (APIException e) {
showAlertMessage("",e.getMessage());
} catch (InvalidRequestException e) {
showAlertMessage("", e.getMessage());
} catch (APIConnectionException e) {
showAlertMessage("",e.getMessage());
}
代码示例来源:origin: stackoverflow.com
final Map<String, String> params = new HashMap<>();
// Code from Stripe.com documentation..
Card card = new Card("4242424242424242", "12", "2014", "123");
Stripe stripe = new Stripe("pk_test_api_key");
stripe.createToken(
card,
new TokenCallback() {
public void onSuccess(Token token) {
// Send token to your server via POST request
params.put("stripeToken", token.getId());
}
public void onError(Exception error) {
// Show localized error message
Toast.makeText(getContext(),
error.getLocalizedString(getContext()),
Toast.LENGTH_LONG
).show();
}
}
代码示例来源:origin: com.amysta.jclouds.api/openstack-keystone
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: org.apache.jclouds.api/openstack-keystone
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-keystone
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: org.jclouds.api/openstack-keystone
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: Nextdoor/bender
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: apache/jclouds
public T fromToken(Token in) {
return this
.id(in.getId())
.expires(in.getExpires())
.tenant(in.getTenant().orNull());
}
}
代码示例来源:origin: apache/jclouds
public void testToken() {
TokenApi tokenApi = api.getTokenApi().get();
assertTrue(tokenApi.isValid(token));
Token result = tokenApi.get(token);
assertNotNull(result);
assertEquals(result.getId(), token);
assertNotNull(result.getTenant());
User user = tokenApi.getUserOfToken(token);
assertNotNull(user);
assertNotNull(user.getId());
assertNotNull(user.getName());
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testToken() {
TokenApi tokenApi = api.getTokenApi().get();
assertTrue(tokenApi.isValid(token));
Token result = tokenApi.get(token);
assertNotNull(result);
assertEquals(result.getId(), token);
assertNotNull(result.getTenant());
User user = tokenApi.getUserOfToken(token);
assertNotNull(user);
assertNotNull(user.getId());
assertNotNull(user.getName());
}
内容来源于网络,如有侵权,请联系作者删除!