當前位置: 首頁>>代碼示例>>Java>>正文


Java ClientAuthentication類代碼示例

本文整理匯總了Java中net.openid.appauth.ClientAuthentication的典型用法代碼示例。如果您正苦於以下問題:Java ClientAuthentication類的具體用法?Java ClientAuthentication怎麽用?Java ClientAuthentication使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ClientAuthentication類屬於net.openid.appauth包,在下文中一共展示了ClientAuthentication類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: performTokenRequest

import net.openid.appauth.ClientAuthentication; //導入依賴的package包/類
@MainThread
private void performTokenRequest(
        TokenRequest request,
        AuthorizationService.TokenResponseCallback callback) {
    ClientAuthentication clientAuthentication;
    try {
        clientAuthentication = mStateManager.getCurrent().getClientAuthentication();
    } catch (ClientAuthentication.UnsupportedAuthenticationMethod ex) {
        Log.d(TAG, "Token request cannot be made, client authentication for the token "
                        + "endpoint could not be constructed (%s)", ex);
        displayNotAuthorized("Client authentication method is unsupported");
        return;
    }

    mAuthService.performTokenRequest(
            request,
            clientAuthentication,
            callback);
}
 
開發者ID:openid,項目名稱:AppAuth-Android,代碼行數:20,代碼來源:TokenActivity.java

示例2: performTokenRequest

import net.openid.appauth.ClientAuthentication; //導入依賴的package包/類
@WorkerThread
private void performTokenRequest(TokenRequest request, AuthorizationService.TokenResponseCallback callback) {
    ClientAuthentication clientAuthentication;
    try {
        clientAuthentication = stateManager.getCurrent().getClientAuthentication();
    } catch (ClientAuthentication.UnsupportedAuthenticationMethod ex) {
        log(String.format("Token request cannot be made, client authentication for the token "
                + "endpoint could not be constructed (%s)", ex));
        log("Client authentication method is unsupported");
        return;
    }

    service.performTokenRequest(
            request,
            clientAuthentication,
            callback);
}
 
開發者ID:p7s1-ctf,項目名稱:7pass-android-sample,代碼行數:18,代碼來源:PostLoginActivity.java


注:本文中的net.openid.appauth.ClientAuthentication類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。