2016-09-25 34 views
1

我正在與跑道上的其他人合作,將各種外部應用程序與我們在跑道上創建的信息管理系統集成。離開工作區後的Podio API密鑰

我需要澄清我對API密鑰生成的理解。具體來說,API密鑰是從用戶的帳戶設置生成的。如果我爲集成生成API密鑰並且稍後從該工作區中刪除,是否會終止與Podio中的應用程序的連接?

我知道,簡單的問題和明顯的答案是肯定的,它會終止連接,但我想知道是否有人有直接的經驗,並可以證實我的假設。

回答

1

有幾種使用Podio API密鑰的方法。 Client-ID和Client-Secret 單獨使用不允許您訪問應用程序或工作區。客戶端ID和客戶端祕密只是將您標識爲「開發者」,他已被授予使用Podio API的權限。同樣,這個數據單獨不授予您的用戶訪問任何工作區或應用程序。

讓我們回顧一下波迪奧API認證更詳細的工作原理:
文檔主頁:https://developers.podio.com/authentication

例子在Ruby中:

Podio.setup(
    :api_key => 'USER_0_CLIENT_ID', 
    :api_secret => 'USER_0_CLIENT_SECRET' 
) 
begin 
    Podio.client.authenticate_with_credentials('USER_1', 'PASSWD') 
    # got access to ALL info that USER_1 can access, but not USER_0 

    Podio.client.authenticate_with_credentials('USER_2', 'PASSWD') 
    # got access to ALL info that USER_2 can access (but won't be able to access any info from USER_1 nor USER_0) 

    Podio.client.authenticate_with_app('APP_1_ID', 'APP_1_TOKEN') 
    # get access to APP_1 items (and nothing else), and it doesn't matter if USER_0 has access to APP_1 or not (nor USER_1, nor USER_2) 

    Podio.client.authenticate_with_app('APP_2_ID', 'APP_2_TOKEN') 
    # get access to APP_2 items (and nothing else), and it doesn't matter if USER_0 has access to APP_2 or not 

rescue Podio::PodioError => ex 
    # Something went wrong 
end 

因此,你需要一個有效的客戶ID /客戶端祕密以及有效的認證憑證,以實際訪問跑道內的任何信息。身份驗證憑證可以是其他用戶登錄名/密碼,app_id/app_token或由用戶通過服務器端流程或客戶端流程登錄時由Podio生成的access_token。

+0

謝謝你的迴應。 #2適用於我所指的內容,但如果客戶端ID和客戶端密鑰是來自不再能夠訪問工作區的用戶的API連接的一部分,他們如何繼續訪問? –

+0

我已經重新構造了答案,以明確客戶端ID和客戶端祕密不提供任何訪問權限,但只有ClientID/Secret與用戶名/密碼或app_id/token或access_token的完整組合纔可以訪問Podio應用程序,項目。 –