简体   繁体   English

使用不带Cookie的Java存储Oauth令牌

[英]Store Oauth token using java without cookies

I am fairly new to REST.I am developing a java library(No frameworks used) to handle all REST API calls.I want this API to handle storing the oauth credentials that I get on first hit, so that I do not need to request it for subsequent calls till the token expires. 我对REST还很陌生,我正在开发一个Java库(不使用任何框架)来处理所有REST API调用。我希望该API可以处理存储我第一次点击时获得的oauth凭据,因此我不需要请求它用于后续调用,直到令牌过期。 I have read a lot about storing in cookies but that approach did not work for me. 我已经阅读了很多有关存储在cookie中的信息,但是这种方法对我不起作用。 I do not have a response or request object. 我没有响应或请求对象。 I do not want to store the token in DB as of now, What could be the next best way to store oauth token until it expires. 我现在不希望将令牌存储在数据库中,在到期之前存储oauth令牌的下一个最佳方法是什么。

Can someone suggest an approach that does not involve cookies or DB. 有人可以建议一种不涉及cookie或数据库的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有一种方法可以在不使用spring的情况下验证普通java应用程序(云铸造中的微服务)中approuter发送的oauth令牌 - Is there a way to validate oauth token sent by approuter in plain java application ( micro service in cloud foundry ) without using spring 使用 java 6 获取不记名令牌(OAUTH 2.0) - getting bearer token(OAUTH 2.0 ) using java 6 使用Spring Security 3在我的Grails OAuth提供程序上存储访问令牌 - Store access token on my Grails OAuth provider using Spring Security 3 Java Oauth request_token 流示例,无库 - Java Oauth request_token flow example, without libraries 无需用户交互的 Google Cloud OAuth 2.0 请求令牌 - Java - Google Cloud OAuth 2.0 Request Token without user interaction - Java Java 使用客户端凭据授予获取访问令牌并存储令牌 - Java Get access token using Client Credentials grant and store the token 使用 java 从 Oauth2 rest api 获取访问令牌 - Get access token from Oauth2 rest api using java 使用放心的 Java 客户端获取 oauth2 令牌 - Get oauth2 token using rest assured Java client 使用Oauth2和独立的Java应用程序获取访问令牌 - Getting Access token using Oauth2 with standalone java application 使用Java从Instagram API获取oAuth令牌 - Getting oAuth token from Instagram API using Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM