* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tc = tcf.newClient(tokenServiceURL, 3000);
tc.client_creds(client_id, client_secret);
int at = username.indexOf('@');
tc = tcf.newClient(tokenServiceURL, 3000);
tc.client_creds(client_id, client_secret);
int at = username.indexOf('@');
tc.password(at>=0?username.substring(0, at):username,access.getProperty("cadi_password"));
rtt = tc.getToken("org.osaaf.aaf","org.osaaf.test");
if (rtt.isOK()) {
tc.password(at>=0?username.substring(0, at):username,access.getProperty("cadi_password"));
rtt = tc.getToken("org.osaaf.aaf","org.osaaf.test");
if (rtt.isOK()) {
tc = tcf.newClient(tokenAltIntrospectURL, 3000);
tc.client_creds(client_id, client_secret);
Result<Introspect> rti = tc.introspect(rtt.value.getAccessToken());
tc = tcf.newClient(tokenAltIntrospectURL, 3000);
tc.client_creds(client_id, client_secret);
Result<Introspect> rti = tc.introspect(rtt.value.getAccessToken());
// private TokenClient testROPCFlow(final String url, final String client_id, final String client_secret, String user, String password, final String ... scope) throws Exception {
// TokenClient tclient = tcf.newClient(url,3000);
// tclient.client_creds(client_id, client_secret);
// private TokenClient testROPCFlow(final String url, final String client_id, final String client_secret, String user, String password, final String ... scope) throws Exception {
// TokenClient tclient = tcf.newClient(url,3000);
// tclient.client_creds(client_id, client_secret);
private String serviceCall(TzClient tzClient) throws Exception {
return tzClient.best(new Retryable<String>() {
@Override
private String serviceCall(TzClient tzClient) throws Exception {
return tzClient.best(new Retryable<String>() {
@Override
private void print(Introspect ti) {
if (ti==null || ti.getClientId()==null) {
System.out.println("Empty Introspect");
private void print(Introspect ti) {
if (ti==null || ti.getClientId()==null) {
System.out.println("Empty Introspect");