• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DbxWebAuth类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中com.dropbox.core.DbxWebAuth的典型用法代码示例。如果您正苦于以下问题:Java DbxWebAuth类的具体用法?Java DbxWebAuth怎么用?Java DbxWebAuth使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DbxWebAuth类属于com.dropbox.core包,在下文中一共展示了DbxWebAuth类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doStart

点赞 3

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
public void doStart(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
    if (!common.checkPost(request, response)) return;
    User user = common.requireLoggedInUser(request, response);
    if (user == null) return;

    // Start the authorization process with Dropbox.
    DbxWebAuth.Request authRequest = DbxWebAuth.newRequestBuilder()
        // After we redirect the user to the Dropbox website for authorization,
        // Dropbox will redirect them back here.
        .withRedirectUri(getRedirectUri(request), getSessionStore(request))
        .build();
    String authorizeUrl = getWebAuth(request).authorize(authRequest);

    // Redirect the user to the Dropbox website so they can approve our application.
    // The Dropbox website will send them back to /dropbox-auth-finish when they're done.
    response.sendRedirect(authorizeUrl);
}
 

开发者ID:dropbox,
项目名称:dropbox-sdk-java
代码行数:19,
代码来源:DropboxAuth.java

示例2: DropboxService

点赞 2

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
public DropboxService(final DropboxConfigProperties dropboxConfigProperties, final DbxWebAuth auth, final DbxRequestConfig requestConfig,
        final UserTokenRepository userTokenRepository) {
    this.dropboxConfigProp = dropboxConfigProperties;
    this.auth = auth;
    this.requestConfig = requestConfig;
    this.userTokenRepository = userTokenRepository;
}
 

开发者ID:zeldan,
项目名称:dropbox-webhooks-spring-boot-example,
代码行数:8,
代码来源:DropboxService.java

示例3: startAuth

点赞 2

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
public String startAuth(final HttpSession session) {
    final DbxSessionStore csrfTokenStore = new DbxStandardSessionStore(session, dropboxConfigProp.getSessionStore().getKey());
    final DbxWebAuth.Request authRequest = DbxWebAuth.newRequestBuilder()
            .withRedirectUri(dropboxConfigProp.getRedirectUri(), csrfTokenStore)
            .build();
    return auth.authorize(authRequest);
}
 

开发者ID:zeldan,
项目名称:dropbox-webhooks-spring-boot-example,
代码行数:8,
代码来源:DropboxService.java

示例4: dbxWebAuth

点赞 2

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
@Bean
public DbxWebAuth dbxWebAuth(final DbxRequestConfig requestConfig) {
    final DbxAppInfo appInfo = new DbxAppInfo(dropboxConfigProperties.getKey(), dropboxConfigProperties.getSecret());
    return new DbxWebAuth(requestConfig, appInfo);
}
 

开发者ID:zeldan,
项目名称:dropbox-webhooks-spring-boot-example,
代码行数:6,
代码来源:DropboxConfig.java

示例5: requestAuthorization

点赞 2

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
public static DbxWebAuth requestAuthorization() throws SearchLibException {
	// TODO do the implementation
	throw new SearchLibException("Not yet implemented");
}
 

开发者ID:jaeksoft,
项目名称:opensearchserver,
代码行数:5,
代码来源:DropboxFileInstance.java

示例6: retrieveAccessToken

点赞 2

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
public static String retrieveAccessToken(DbxWebAuth webAuth, StringBuilder sbUid) throws SearchLibException {
	// TODO do the implementation
	throw new SearchLibException("Not yet implemented");
}
 

开发者ID:jaeksoft,
项目名称:opensearchserver,
代码行数:5,
代码来源:DropboxFileInstance.java

示例7: getWebAuth

点赞 2

import com.dropbox.core.DbxWebAuth; //导入依赖的package包/类
private DbxWebAuth getWebAuth(final HttpServletRequest request) {
    return new DbxWebAuth(common.getRequestConfig(request), common.dbxAppInfo);
}
 

开发者ID:dropbox,
项目名称:dropbox-sdk-java
代码行数:4,
代码来源:DropboxAuth.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)