private Element getSamlTokenFromCaller() throws UnsupportedCallbackException, LoginException, IOException { final TokenCallback callback = new TokenCallback(); getCallbackHandler().handle(new Callback[] {callback}); final Element token = (Element) callback.getToken(); if (token == null) throw new LoginException(ErrorCodes.NULL_VALUE + "Could not locate a Security Token from the callback."); return token; } }
new Stripe().createToken( card, PUBLISHABLE_STRIPE_KEY, new TokenCallback() { public void onSuccess(Token token) {
/** * {@inheritDoc} */ @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { Set<Credential> credentials = getCredentials(); if (credentials == null) { throw JBossSecurityMessages.MESSAGES.credentialsNotSet(); } for (Callback cb : callbacks) { if (cb instanceof TokenCallback) { for (Credential cred : credentials) { if (cred instanceof AssertionCredential) { ((TokenCallback)cb).setToken(((AssertionCredential)cred).getAssertion()); } } } } }
new Stripe().createToken(card, key, new TokenCallback() { @Override public void onError(Exception e) {
/** * {@inheritDoc} */ @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { Set<Credential> credentials = getCredentials(); if (credentials == null) { throw JBossSecurityMessages.MESSAGES.credentialsNotSet(); } for (Callback cb : callbacks) { if (cb instanceof TokenCallback) { for (Credential cred : credentials) { if (cred instanceof AssertionCredential) { ((TokenCallback)cb).setToken(((AssertionCredential)cred).getAssertion()); } } } } }
private Element getSamlTokenFromCaller() throws UnsupportedCallbackException, LoginException, IOException { final TokenCallback callback = new TokenCallback(); getCallbackHandler().handle(new Callback[] {callback}); final Element token = (Element) callback.getToken(); if (token == null) throw new LoginException(ErrorCodes.NULL_VALUE + "Could not locate a Security Token from the callback."); return token; } }
startProgress(); new Stripe().createToken(card, PUBLISHABLE_KEY, new TokenCallback() { public void onSuccess(Token token) { try {
private Element getSamlTokenFromCaller() throws UnsupportedCallbackException, LoginException, IOException { final TokenCallback callback = new TokenCallback(); getCallbackHandler().handle(new Callback[] { callback }); final Element token = (Element) callback.getToken(); if (token == null) throw logger.authCouldNotLocateSecurityToken(); return token; } }
startProgress(); new Stripe().createToken(card, PUBLISHABLE_KEY, new TokenCallback() { public void onSuccess(Token token) { try {
private Element getSamlTokenFromCaller() throws UnsupportedCallbackException, LoginException, IOException { final TokenCallback callback = new TokenCallback(); getCallbackHandler().handle(new Callback[]{callback}); final Element token = (Element) callback.getToken(); if (token == null) throw logger.authCouldNotLocateSecurityToken(); return token; } }
private Element getSamlTokenFromCaller() throws UnsupportedCallbackException, LoginException, IOException { final TokenCallback callback = new TokenCallback(); getCallbackHandler().handle(new Callback[]{callback}); final Element token = (Element) callback.getToken(); if (token == null) throw logger.authCouldNotLocateSecurityToken(); return token; } }