新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

JWT Token refresh / timeout

新規投稿

コメント

1件のコメント

  • kendomen

    I believe the default is around 60 minutes.

     

    I've been using the SDK so there seems to be wrappers around token management.  For example:

    public static BoxDeveloperEditionAPIConnection getAppEnterpriseConnection(String enterpriseId, String clientId,
                String clientSecret, JWTEncryptionPreferences encryptionPref, IAccessTokenCache accessTokenCache) {
    
            BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection(enterpriseId,
                    DeveloperEditionEntityType.ENTERPRISE, clientId, clientSecret, encryptionPref, accessTokenCache);
    
            connection.tryRestoreUsingAccessTokenCache();
    
            return connection;
        }

    but if you don't use the SDK, I do both.  I check to see if token has expired and I also wrap it in a try/catch for 401 errors.

     

    0
    コメントアクション Permalink

サインインしてコメントを残してください。