PassportIdentity.GetIsAuthenticated メソッド (Int32, Int32, Int32)
ユーザーが Passport 権限で認証されているかどうかを示します。
Overloads Public Function GetIsAuthenticated( _
ByVal iTimeWindow As Integer, _ ByVal iForceLogin As Integer, _ ByVal iCheckSecure As Integer _) As Boolean
[C#]
public bool GetIsAuthenticated(intiTimeWindow,intiForceLogin,intiCheckSecure);
[C++]
public: bool GetIsAuthenticated(intiTimeWindow,intiForceLogin,intiCheckSecure);
[JScript]
public function GetIsAuthenticated(
iTimeWindow : int,iForceLogin : int,iCheckSecure : int) : Boolean;
iTimeWindow
メンバが呼び出し元のドメインに最後にログオンした間隔を指定します。-1 は、Passport で既定値を使用することを示します。0 は false を表します。1 は true を表します。iForceLogin
iTimeWindow パラメータの使用方法を確認します。-1 は、Passport で既定値を使用することを示します。0 は false を表します。1 は true を表します。iCheckSecure
暗号化されたログオンかどうかを確認できます。-1 は、Passport で既定値を使用することを示します。0 は false を表します。1 は true を表します。Passport Version 2.1 の Login サーバーに 10 または 100 を値として指定すると、Passport マネージャの
IsAuthenticated
メソッドにSecureLevel
として 10 または 100 が渡されます。詳細については、Passport Version 2.1 SDK のドキュメントを参照してください。Passport Version 1.4 Login サーバーでは、SSL サインインはオプションとして利用できません。 iCheckSecure の値は、サーバーで無視されます。
ユーザーが Passport 認証を行う中央サイトで認証されている場合は true 。それ以外の場合は false 。
Passport 認証の詳細については、MSDN ライブラリで Passport Version 1.4 SDK または Version 2.1 SDK に関するドキュメントの IsAuthenticated
メソッドの説明を参照してください。Passport Version 1.4 のドキュメントは、https://msdn.microsoft.com/library で参照できます。Passport Version 2.1 SDK のドキュメントは、https://msdn.microsoft.com/downloads からダウンロードできます。
<!--
This example demonstrates implementing the soft sign-in authentication approach.
In order for the example to work, the following requirements must be met.
You can find details on these requirements in the Passport SDK documentation.
1. You must modify the Web.config file associated with this page so that
authentication mode is set to "Passport".
2. You must have the Passport SDK installed.
3. You must have a Passport Site ID for the site where your page resides.
If your Site ID is in the PREP environment, you will also need a PREP Passport.
4. You must have installed the encryption key you received after registering your
site and receiving a site ID.
5. You must have the Passport Manager object settings correctly configured for your site.
-->
. . .
<!-- To view this code snippet in a fully-working example, see the
PassportIdentity Class topic. -->
. . .
Dim identity As PassportIdentity = Me.Context.User.Identity
' Determine whether the user is already signed in with a valid
' and current ticket. Passing -1 for the parameter values
' indicates the default values will be used.
If (identity.GetIsAuthenticated(-1, -1, -1)) Then
Me.Response.Write("Welcome to the site.<br><br>")
' Print the Passport sign in button on the screen.
Me.Response.Write(identity.LogoTag2())
[C#]
<!--
This example demonstrates implementing the soft sign-in authentication approach.
In order for the example to work, the following requirements must be met.
You can find details on these requirements in the Passport SDK documentation.
1. You must modify the Web.config file associated with this page so that
authentication mode is set to "Passport".
2. You must have the Passport SDK installed.
3. You must have a Passport Site ID for the site where your page resides.
If your Site ID is in the PREP environment, you will also need a PREP Passport.
4. You must have installed the encryption key you received after registering
your site and receiving a site ID.
5. You must have the Passport Manager object settings correctly configured for
your site.
-->
. . .
<!-- To view this code snippet in a fully-working example, see the
PassportIdentity Class topic. -->
. . .
PassportIdentity identity = (this.Context.User.Identity as PassportIdentity);
// Determine whether the user is already signed in with a valid
// and current ticket. Passing -1 for the parameter values
// indicates the default values will be used.
if (identity.GetIsAuthenticated(-1, -1, -1))
{
this.Response.Write("Welcome to the site.<br><br>");
// Print the Passport sign in button on the screen.
this.Response.Write(identity.LogoTag2());
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
PassportIdentity クラス | PassportIdentity メンバ | System.Web.Security 名前空間 | PassportIdentity.GetIsAuthenticated オーバーロードの一覧