本文整理了Java中org.jclouds.openstack.keystone.v2_0.domain.Access.getToken()
方法的一些代码示例,展示了Access.getToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Access.getToken()
方法的具体详情如下:
包路径:org.jclouds.openstack.keystone.v2_0.domain.Access
类名称:Access
方法名:getToken
[英]TODO
[中]待办事项
代码示例来源:origin: Nextdoor/bender
@Override
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: com.amysta.jclouds.api/openstack-trove
public Optional<Tenant> apply(Access in){
return in.getToken().getTenant();
}
}
代码示例来源: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: com.amysta.jclouds.labs/rackspace-autoscale
public Optional<Tenant> apply(Access in){
return in.getToken().getTenant();
}
}
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-trove
public Optional<Tenant> apply(Access in){
return in.getToken().getTenant();
}
}
代码示例来源:origin: org.jclouds.api/openstack-keystone
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-keystone
public String get() {
return supplier.get().getToken().getId();
}
};
代码示例来源:origin: apache/jclouds
public Optional<String> apply(AuthInfo in) {
if (in instanceof Access) {
return Access.class.cast(in).getToken().getTenant().transform(new Function<Tenant, String>() {
@Override
public String apply(Tenant input) {
return input.getId();
}
});
} else if (in instanceof Token) {
// FIXME: What if user authenticated scoped to another project?
return Optional.of(Token.class.cast(in).user().defaultProjectId());
}
return Optional.absent();
}
}
代码示例来源:origin: org.apache.jclouds.labs/rackspace-cloudbigdata
public Optional<String> apply(AuthInfo in) {
if (in instanceof Access) {
return Access.class.cast(in).getToken().getTenant().transform(new Function<Tenant, String>() {
@Override
public String apply(Tenant input) {
return input.getId();
}
});
} else if (in instanceof Token) {
// FIXME: What if user authenticated scoped to another project?
return Optional.of(Token.class.cast(in).user().defaultProjectId());
}
return Optional.absent();
}
}
代码示例来源:origin: org.apache.jclouds.labs/rackspace-autoscale
public Optional<String> apply(AuthInfo in){
if (in instanceof Access) {
return Access.class.cast(in).getToken().getTenant().transform(new Function<Tenant, String>() {
@Override
public String apply(Tenant input) {
return input.getId();
}
});
} else if (in instanceof Token) {
// FIXME: What if user authenticated scoped to another project?
return Optional.of(Token.class.cast(in).user().defaultProjectId());
}
return Optional.absent();
}
}
代码示例来源:origin: org.apache.jclouds.api/openstack-trove
public Optional<String> apply(AuthInfo in) {
if (in instanceof Access) {
return Access.class.cast(in).getToken().getTenant().transform(new Function<Tenant, String>() {
@Override
public String apply(Tenant input) {
return input.getId();
}
});
} else if (in instanceof Token) {
// FIXME: What if user authenticated scoped to another project?
return Optional.of(Token.class.cast(in).user().defaultProjectId());
}
return Optional.absent();
}
}
代码示例来源:origin: jclouds/legacy-jclouds
private HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds) {
Credentials currentCreds = checkNotNull(creds.get(), "credential supplier returned null");
// accessKey is of the form tenantName:accessKeyId (not tenantId)
String accessKeyId = currentCreds.identity.substring(currentCreds.identity.indexOf(':') + 1);
String secretKey = currentCreds.credential;
String tenantId = access.get().getToken().getTenant().get().getId();
HttpRequest.Builder<?> builder = request.toBuilder();
// HP Cloud does not use X-Auth-Token for temporary signed URLs and
// leaking this allows clients arbitrary privileges until token timeout.
builder.filters(filter(request.getFilters(), not(instanceOf(AuthenticateRequest.class))));
long expiresInSeconds = unixEpochTimestampProvider.get() + timeInSeconds;
String signature = createSignature(secretKey,
createStringToSign(request.getMethod().toUpperCase(), request, expiresInSeconds));
builder.addQueryParam("temp_url_sig", String.format("%s:%s:%s", tenantId, accessKeyId, signature));
builder.addQueryParam("temp_url_expires", "" + expiresInSeconds);
return builder.build();
}
代码示例来源:origin: jclouds/legacy-jclouds
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
代码示例来源:origin: org.apache.jclouds.api/openstack-keystone
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
代码示例来源:origin: apache/jclouds
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
代码示例来源:origin: Nextdoor/bender
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-keystone
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
代码示例来源:origin: com.amysta.jclouds.api/openstack-keystone
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
代码示例来源:origin: org.jclouds.api/openstack-keystone
public T fromAccess(Access in) {
return this.token(in.getToken()).user(in.getUser()).services(in);
}
}
内容来源于网络,如有侵权,请联系作者删除!