Authentication.Login メソッド (websvcAuthentication)

フォーム ベース認証システムで使用され、認証 Cookie を設定するか、またはログオンに問題がある場合にエラー コードを返します。

名前空間: websvcAuthentication
アセンブリ: STSSOAP (stssoap.dll 内)

構文

'宣言
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/Login", RequestNamespace:="https://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace:="https://schemas.microsoft.com/sharepoint/soap/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function Login ( _
    username As String, _
    password As String _
) As LoginResult
'使用
Dim instance As Authentication
Dim username As String
Dim password As String
Dim returnValue As LoginResult

returnValue = instance.Login(username, password)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/Login", RequestNamespace="https://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="https://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public LoginResult Login (
    string username,
    string password
)

パラメータ

  • username
    SharePoint サイト用のユーザーのログオン名。
  • password
    ユーザーのパスワード。

戻り値

ErrorCode フィールドにエラー コードを含むか、CookieName プロパティに認証 Cookie の名前を含む、LoginResult 構造体。

備考

Login メソッドは、Microsoft ASP.NET 2.0 の Membership クラスおよび FormsAuthentication クラスで提供される認証サービスを使用します。

Cookie には認証チケットが格納され、このチケットが、サーバーに対する後続の要求を認証する際に使用されます。

ユーザー名またはパスワードに対しては、必要に応じて長さや形式に関する制限を設けるようにします。たとえば、パスワードに必ず数字やカンマを含めるように指定できます。この場合は、Login メソッドにユーザー名とパスワードを渡す前に、独自に作成した検証ロジックを提供する必要があります。パフォーマンス上の理由により、この検証手順はクライアント コンピュータでローカルに行う必要があります。

関連項目

参照

Authentication クラス
Authentication メンバ
websvcAuthentication 名前空間
Membership
FormsAuthentication

その他のリソース

承認と認証