mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Encrypt all image uploader settings
This commit is contained in:
parent
5515739e9c
commit
1c2abb9b95
5 changed files with 31 additions and 23 deletions
|
@ -30,6 +30,7 @@ namespace ShareX.UploadersLib
|
||||||
public class CheveretoUploader
|
public class CheveretoUploader
|
||||||
{
|
{
|
||||||
public string UploadURL { get; set; }
|
public string UploadURL { get; set; }
|
||||||
|
[JsonEncrypt]
|
||||||
public string APIKey { get; set; }
|
public string APIKey { get; set; }
|
||||||
|
|
||||||
public CheveretoUploader()
|
public CheveretoUploader()
|
||||||
|
|
|
@ -25,6 +25,7 @@ You should have received a copy of the GNU General Public License
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using ShareX.HelpersLib;
|
||||||
using ShareX.UploadersLib.Properties;
|
using ShareX.UploadersLib.Properties;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
@ -236,6 +237,7 @@ public class ImageShackImage
|
||||||
public class ImageShackOptions
|
public class ImageShackOptions
|
||||||
{
|
{
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
[JsonEncrypt]
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
public bool IsPublic { get; set; }
|
public bool IsPublic { get; set; }
|
||||||
public string Auth_token { get; set; }
|
public string Auth_token { get; set; }
|
||||||
|
|
|
@ -24,13 +24,16 @@ You should have received a copy of the GNU General Public License
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using ShareX.HelpersLib;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace ShareX.UploadersLib
|
namespace ShareX.UploadersLib
|
||||||
{
|
{
|
||||||
public class OAuth2Token
|
public class OAuth2Token
|
||||||
{
|
{
|
||||||
|
[JsonEncrypt]
|
||||||
public string access_token { get; set; }
|
public string access_token { get; set; }
|
||||||
|
[JsonEncrypt]
|
||||||
public string refresh_token { get; set; }
|
public string refresh_token { get; set; }
|
||||||
public int expires_in { get; set; }
|
public int expires_in { get; set; }
|
||||||
public string token_type { get; set; }
|
public string token_type { get; set; }
|
||||||
|
|
|
@ -23,6 +23,7 @@ You should have received a copy of the GNU General Public License
|
||||||
|
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
|
using ShareX.HelpersLib;
|
||||||
using ShareX.UploadersLib.Properties;
|
using ShareX.UploadersLib.Properties;
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
@ -59,16 +60,16 @@ public enum OAuthInfoSignatureMethod
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public string AuthToken { get; set; }
|
public string AuthToken { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false), JsonEncrypt]
|
||||||
public string AuthSecret { get; set; }
|
public string AuthSecret { get; set; }
|
||||||
|
|
||||||
[Description("Verification Code from the Authorization Page")]
|
[JsonEncrypt, Description("Verification Code from the Authorization Page")]
|
||||||
public string AuthVerifier { get; set; }
|
public string AuthVerifier { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public string UserToken { get; set; }
|
public string UserToken { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false), JsonEncrypt]
|
||||||
public string UserSecret { get; set; }
|
public string UserSecret { get; set; }
|
||||||
|
|
||||||
public OAuthInfo()
|
public OAuthInfo()
|
||||||
|
|
|
@ -39,56 +39,57 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
#region Imgur
|
#region Imgur
|
||||||
|
|
||||||
public AccountType ImgurAccountType = AccountType.Anonymous;
|
public AccountType ImgurAccountType { get; set; } = AccountType.Anonymous;
|
||||||
public bool ImgurDirectLink = true;
|
public bool ImgurDirectLink { get; set; } = true;
|
||||||
public ImgurThumbnailType ImgurThumbnailType = ImgurThumbnailType.Medium_Thumbnail;
|
public ImgurThumbnailType ImgurThumbnailType { get; set; } = ImgurThumbnailType.Medium_Thumbnail;
|
||||||
public bool ImgurUseGIFV = true;
|
public bool ImgurUseGIFV { get; set; } = true;
|
||||||
public OAuth2Info ImgurOAuth2Info = null;
|
public OAuth2Info ImgurOAuth2Info { get; set; } = null;
|
||||||
public bool ImgurUploadSelectedAlbum = false;
|
public bool ImgurUploadSelectedAlbum { get; set; } = false;
|
||||||
public ImgurAlbumData ImgurSelectedAlbum = null;
|
public ImgurAlbumData ImgurSelectedAlbum { get; set; } = null;
|
||||||
public List<ImgurAlbumData> ImgurAlbumList = null;
|
public List<ImgurAlbumData> ImgurAlbumList { get; set; } = null;
|
||||||
|
|
||||||
#endregion Imgur
|
#endregion Imgur
|
||||||
|
|
||||||
#region ImageShack
|
#region ImageShack
|
||||||
|
|
||||||
public ImageShackOptions ImageShackSettings = new ImageShackOptions();
|
public ImageShackOptions ImageShackSettings { get; set; } = new ImageShackOptions();
|
||||||
|
|
||||||
#endregion ImageShack
|
#endregion ImageShack
|
||||||
|
|
||||||
#region Flickr
|
#region Flickr
|
||||||
|
|
||||||
public OAuthInfo FlickrOAuthInfo = null;
|
public OAuthInfo FlickrOAuthInfo { get; set; } = null;
|
||||||
public FlickrSettings FlickrSettings = new FlickrSettings();
|
public FlickrSettings FlickrSettings { get; set; } = new FlickrSettings();
|
||||||
|
|
||||||
#endregion Flickr
|
#endregion Flickr
|
||||||
|
|
||||||
#region Photobucket
|
#region Photobucket
|
||||||
|
|
||||||
public OAuthInfo PhotobucketOAuthInfo = null;
|
public OAuthInfo PhotobucketOAuthInfo { get; set; } = null;
|
||||||
public PhotobucketAccountInfo PhotobucketAccountInfo = null;
|
public PhotobucketAccountInfo PhotobucketAccountInfo { get; set; } = null;
|
||||||
|
|
||||||
#endregion Photobucket
|
#endregion Photobucket
|
||||||
|
|
||||||
#region Google Photos
|
#region Google Photos
|
||||||
|
|
||||||
public OAuth2Info GooglePhotosOAuth2Info = null;
|
public OAuth2Info GooglePhotosOAuth2Info { get; set; } = null;
|
||||||
public OAuthUserInfo GooglePhotosUserInfo = null;
|
public OAuthUserInfo GooglePhotosUserInfo { get; set; } = null;
|
||||||
public string GooglePhotosAlbumID = "";
|
public string GooglePhotosAlbumID { get; set; } = "";
|
||||||
public bool GooglePhotosIsPublic = false;
|
public bool GooglePhotosIsPublic { get; set; } = false;
|
||||||
|
|
||||||
#endregion Google Photos
|
#endregion Google Photos
|
||||||
|
|
||||||
#region Chevereto
|
#region Chevereto
|
||||||
|
|
||||||
public CheveretoUploader CheveretoUploader = new CheveretoUploader();
|
public CheveretoUploader CheveretoUploader { get; set; } = new CheveretoUploader();
|
||||||
public bool CheveretoDirectURL = true;
|
public bool CheveretoDirectURL { get; set; } = true;
|
||||||
|
|
||||||
#endregion Chevereto
|
#endregion Chevereto
|
||||||
|
|
||||||
#region vgy.me
|
#region vgy.me
|
||||||
|
|
||||||
public string VgymeUserKey = "";
|
[JsonEncrypt]
|
||||||
|
public string VgymeUserKey { get; set; } = "";
|
||||||
|
|
||||||
#endregion vgy.me
|
#endregion vgy.me
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue