{"action":"created","issue":{"url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk/issues/38","repository_url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk","labels_url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk/issues/38/comments","events_url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk/issues/38/events","html_url":"https://github.com/Mangopay/mangopay2-java-sdk/issues/38","id":173459535,"number":38,"title":"Unserializable OAuthToken class","user":{"login":"YaroslavTir","id":3305166,"avatar_url":"https://avatars.githubusercontent.com/u/3305166?v=3","gravatar_id":"","url":"https://api.github.com/users/YaroslavTir","html_url":"https://github.com/YaroslavTir","followers_url":"https://api.github.com/users/YaroslavTir/followers","following_url":"https://api.github.com/users/YaroslavTir/following{/other_user}","gists_url":"https://api.github.com/users/YaroslavTir/gists{/gist_id}","starred_url":"https://api.github.com/users/YaroslavTir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaroslavTir/subscriptions","organizations_url":"https://api.github.com/users/YaroslavTir/orgs","repos_url":"https://api.github.com/users/YaroslavTir/repos","events_url":"https://api.github.com/users/YaroslavTir/events{/privacy}","received_events_url":"https://api.github.com/users/YaroslavTir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T13:58:07Z","updated_at":"2016-09-07T17:51:51Z","closed_at":null,"body":"I am using  strategy IStorageStrategy and I whant to save OAuthTOken in redis\r\n\r\n```\r\npublic interface IStorageStrategy {\r\n  OAuthToken get(String envKey);\r\n  void store(OAuthToken token, String envKey);   \r\n}\r\n```\r\nbut cannot do it!! becouse OAuthToken has token-type private field! I don't want use reflection for this.\r\n\r\n \r\n```\r\npublic class OAuthToken extends Dto implements Serializable {\r\n   private Long create_time;\r\n   public String access_token;\r\n   public String token_type;\r\n   public int expires_in;\r\n    public OAuthToken() {\r\n       create_time = System.currentTimeMillis() - 5000;\r\n   }\r\n   public Boolean IsExpired() {\r\n       return (System.currentTimeMillis() >= (create_time + (expires_in * 1000)));\r\n   }\r\n   \r\n  @Override\r\n   public String toString() {\r\n       \r\n       return \"access_token = \" + this.access_token + \", token_type: \" + this.token_type + \", expires_in: \" + this.expires_in;\r\n       \r\n   }\r\n}\r\n```\r\nand what does mean 5000 magic number?"},"comment":{"url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk/issues/comments/245363047","html_url":"https://github.com/Mangopay/mangopay2-java-sdk/issues/38#issuecomment-245363047","issue_url":"https://api.github.com/repos/Mangopay/mangopay2-java-sdk/issues/38","id":245363047,"user":{"login":"hobailey","id":1564439,"avatar_url":"https://avatars.githubusercontent.com/u/1564439?v=3","gravatar_id":"","url":"https://api.github.com/users/hobailey","html_url":"https://github.com/hobailey","followers_url":"https://api.github.com/users/hobailey/followers","following_url":"https://api.github.com/users/hobailey/following{/other_user}","gists_url":"https://api.github.com/users/hobailey/gists{/gist_id}","starred_url":"https://api.github.com/users/hobailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hobailey/subscriptions","organizations_url":"https://api.github.com/users/hobailey/orgs","repos_url":"https://api.github.com/users/hobailey/repos","events_url":"https://api.github.com/users/hobailey/events{/privacy}","received_events_url":"https://api.github.com/users/hobailey/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T17:51:51Z","updated_at":"2016-09-07T17:51:51Z","body":"Hi @YaroslavTir, we take off 5000ms to try and avoid a situation when the token is valid but has infact expired by the time it reaches the Mangopay servers (because the connection took longer than 5s).\r\nAs for the `token_type`, it seems to me that it is indeed public unless I'm missing something - could you perhaps do a pull request with the changes you'd need so we can understand more clearly?"}}
{"actor":{"display_login":"hobailey"}}