我有一个在JAVA开发的Android应用程序.对于这个应用程序,我使用IdentityServer4作为我的STS,一切正常.但我找不到任何在AppAuth库中注销的实现.谁可以帮我这个事?我真的需要在我的应用程序中使用logout选项,因此用户可以随时从应用程序注销并重新登录.任何想法,样品将不胜感激.
我使用AppAuth外部认证服务器使用0.90.0进行身份验证,用户可以登录,以便应用程序接收适当的身份验证令牌.从最近(升级到swift 4之后)我收到以下警报后才发送到身份验证服务器:
"应用名称"希望使用"externalAuthentication.com"登录"
这允许应用和网站共享有关您的信息.
是否有人遇到过相同的问题和/或有解决方案,因此用户无需在每次向该服务器发出请求时按继续操作?
我正在尝试使用AppAuth-iOS dev-logout分支,并在模拟器10.3.1上进行了测试。当我尝试运行代码时,出现此崩溃:
dyld:未加载库:/System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices原因:找不到图像
AuthenticationServices仅出现在iOS 12.0+中,因此这可能是导致崩溃的原因。
链接到github问题:https : //github.com/openid/AppAuth-iOS/issues/350
感谢您的提示!
我按照将 Azure AD B2C 集成到 Android 应用程序中的示例应用程序进行操作,并替换了我的 Azure AD B2C 租户的配置参数,但是我收到了错误“包含阻止其加载的脚本错误”
这是它生成的 URL,是错误的还是什么?我是新手所以我不太了解:(
login.microsoftonline.com/signintest.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1_signin&redirect_uri=ran%3dom%lett%3ers%idk%why&client_id=clientid&response_type=code&state=_JhayuFI4QGD1bjElOHnvg&scope=openid&code_challenge=uiXfg8c9XEFiHFRvjj VSAbCiRNJf5CeXDFXXN0qlj_U&code_challenge_method=S226
我遇到了类似的 Stackoverflow 问题,但我不知道他的意思是“应使用 Azure 门户的 Azure AD B2C 刀片创建 Azure AD B2C 应用程序”
我试图自己找出这意味着什么,但我什么也没找到。这是什么意思?
我想知道带有 https 方案的 AppAuth 是否适用于 Firefox 和其他浏览器。
我有一个 CAS 5.2 充当 OAuth Idp,但 idp 不是问题,所以我不会在此处发布设置。
我正在尝试制作一个可以与我的 Idp 一起使用的演示 AppAuth 应用程序,我正在使用https://github.com/openid/AppAuth-Android中的演示进行设置。
我正在使用https redirect_uri 架构,因为此 OAuth Idp 不仅适用于移动设备。
问题是,我只能使 OAuth 在Chrome(和自定义选项卡版本)和三星浏览器(和自定义选项卡版本)中工作。
对于我测试过的其他浏览器(Opera、Dophin、Firefox),我只是盯着我的redirect_uri并拒绝返回应用程序[ https://www.example.net/test_oauth/index.php ](注意:我已经提示用户单击重定向链接)
我希望它不仅能与 Chrome 和三星浏览器兼容,如果它能与 Firefox 自定义选项卡等兼容,那就太好了!
设置与AppAuth Demo基本相同,但仅强制客户端密钥(用于测试目的),以及以下配置
auth_config.json:
{
"client_id": "TestOAuth",
"redirect_uri": "https://www.example.net/test_oauth/index.php",
"authorization_scope": "openid email profile",
"discovery_uri": "",
"authorization_endpoint_uri": "https://www.example.net/cas/oauth2.0/authorize",
"token_endpoint_uri": "https://www.example.net/cas/oauth2.0/accessToken",
"registration_endpoint_uri": "",
"user_info_endpoint_uri": "https://www.example.net/cas/oauth2.0/profile",
"https_required": false
}
Run Code Online (Sandbox Code Playgroud)
AndroidManifest.xml
<activity android:name="net.openid.appauth.RedirectUriReceiverActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" …Run Code Online (Sandbox Code Playgroud) 在集成Keyclock SDK时,我尝试交换授权码来访问令牌
authService.performTokenRequest(
resp.createTokenExchangeRequest(),
new AuthorizationService.TokenResponseCallback() {
@Override public void onTokenRequestCompleted(
TokenResponse resp, AuthorizationException ex) {
if (resp != null) {
// exchange succeeded
} else {
// authorization failed, check ex for more details
}
}
});
Run Code Online (Sandbox Code Playgroud)
我收到以下错误,
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalArgumentException: only https connections are permitted
at net.openid.appauth.Preconditions.checkArgument(Preconditions.java:116)
at net.openid.appauth.connectivity.DefaultConnectionBuilder.openConnection(DefaultConnectionBuilder.java:51)
at net.openid.appauth.AuthorizationService$TokenRequestTask.doInBackground(AuthorizationService.java:418)
at net.openid.appauth.AuthorizationService$TokenRequestTask.doInBackground(AuthorizationService.java:395) …Run Code Online (Sandbox Code Playgroud) android android-asynctask android-backup-service keycloak appauth