どのようにシスココンタクトセンターExpressのアイデンティティ・サービスへの認証を行うのですか?

クロエ:

私はコンタクトセンターExpressでの認証にサードパーティのアプリケーションを構築しています。ドキュメントは必要であるが、これを実現するには不十分。例えば、

https://developer.cisco.com/docs/contact-center-express/#!cisco-identity-service-client-sdk-guide/during-agent-login

// Get Access Token for the received Authorization Code
String redirectURI = config.getRedirectUri();
AccessToken token = client.getAccessToken(authCode, redirectURI);

いつ、どこで認証するために、コンタクトセンターにユーザーをリダイレクトするのですか?私はフィネスがにユーザーをリダイレクトすることを観察しました

https://contactcenter.example.com:8553/ids/v1/oauth/authorize?redirect_uri=https%3A%2F%2Ffinesse.example.com%3A443%2Fdesktop%2Fsso%2Fauthcode&client_id=8a75xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&state=aHR0cHM6Ly92bS1mLWZpbi1hLmRldi5pbi5zcGluc2NpLmNvbS9kZXNrdG9wL2pfaWRlbnRpdHlfY2hlY2s%2FZXJyb3I9dHJ1ZQlhcHBsb2dpbg%3D% 3D&response_type =コード

しかし、ここでそれはアイデンティティサービス(IDS)のパスを使用するように指定されていますか/ids/v1/oauth/authorizeそして、状態は必要なパラメータですか?そして、IDS SDKは、コールバックパスを処理しませんか/desktop/sso/authcode私はそれがないことを想像しますが、それに送信されるパラメータは何ですか?私は、Springフレームワークを使用しています。

私は、全体のプロセスをリバースエンジニアリングしたり、私が行方不明だと追加のドキュメントがあるのですか?

私はOAuthのトーク​​ンを受け取った後でも、どのように私は他のシスコ製品に他のREST呼び出しを行うためにそれを使用するのでしょうか?フィネスREST APIはHTTPのみ基本認証を言及します。トークン:「ベアラ認証」のヘッダーの言及はありません。

https://developer.cisco.com/docs/finesse/#!sign-in-to-finesse/sign-in-to-finesse

クロエ:

私はすべてのリダイレクト、次のことをリバースエンジニアリングする必要がありました。

@Controller
public class SSOController {

    @Autowired
    private IdSClientConfigurationImpl config;

    @Autowired 
    private IdSClient client;

    @PostMapping("/login")
    public String login(@RequestParam(name="user", required=true) String user) {
        // redirect the user to the Cisco Contact Center Express Identity Service
        String redirectURI = config.getRedirectUri();
        String clientId = config.getClientId();

        URI uri = UriComponentsBuilder
                .fromUriString("https://contact-center-express:8553/ids/v1/oauth/authorize")
                .queryParam("redirect_uri", "{redirect_uri}")
                .queryParam("client_id", "{client_id}")
//              .queryParam("state", "{state}") // base64 encoded
                .queryParam("response_type", "code")
                .build(redirectURI, clientId);
        return "redirect:"+uri.toString();
    }

    @GetMapping("/idscallback")
    public String idscallback(
            @RequestParam(name="code", required=true) String code, 
            @RequestParam(name="state", required=false) String state,
            HttpSession session) throws IdSClientException {

        // Get Access Token for the received Authorization Code
        String redirectURI = config.getRedirectUri();
        AccessToken token = client.getAccessToken(code, redirectURI); // why do I need redirectURI when it's already redirected?
        String accessTokenString = token.getAccess_token();
        session.setAttribute("token", accessTokenString);
//      model.addAttribute("token", accessTokenString);     
        return "redirect:/";
    }

そして遠く、遠く離れた豆で...

    @Bean
    public IdSClientConfigurationImpl config() throws IOException, IdSClientException {
        ClassPathResource idsclientResource = new ClassPathResource("idsclient.properties");
        IdSClientConfigurationImpl config = new IdSClientConfigurationImpl(idsclientResource.getFile().getPath());
//      IdSClientConfigurationImpl config = new IdSClientConfigurationImpl("src/main/resources/idsclient.properties");
        config.load();
        return config;
    }

    @Bean
    public IdSClient setupIdsClient() throws IOException, IdSClientException {
        IdSClient client = IdSClientFactory.getIdSClient();
        client.setTLSContext(createSSLTrustManager(), createHostnameVerifier());
//      client.setTLSContext(arg0, arg1) // use secure trust manager and hostname verifier in production
        client.init(config);
        return client;
    }

    private X509TrustManager createSSLTrustManager() {
        X509TrustManager tm = new TrustAllX509TrustManager();
        return tm;  
    }

    private HostnameVerifier createHostnameVerifier() {
        HostnameVerifier hv = new SkipAllHostNameVerifier();
        return hv;
    }

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=209941&siteId=1