Instance Method インスタンスメソッド

connectionShouldUseCredentialStorage(_:)

Sent to determine whether the URL loader should use the credential storage for authenticating the connection. URLローダーが資格情報ストレージを接続の認証に対して使うべきかどうかを決定するために送られます。

Declaration 宣言

optional func connectionShouldUseCredentialStorage(_ connection: NSURLConnection) -> Bool

Parameters パラメータ

connection

The connection sending the message. メッセージを送っている接続。

Discussion 議論

This method is called before any attempt to authenticate is made. このメソッドは、認証がなされるためのあらゆる試みの前に呼び出されます。

If you return false, the connection does not consult the credential storage automatically, and does not store credentials. However, in your connection:didReceiveAuthenticationChallenge: method, you can consult the credential storage yourself and store credentials yourself, as needed. あなたがfalseを返すならば、接続は自動的に資格情報ストレージを考慮に入れません、そして資格情報を格納しません。しかしながら、あなたの connection:didReceiveAuthenticationChallenge: メソッドにおいて、あなたはあなた自身で資格情報ストレージを考慮に入れること、そして資格情報を格納することができます、必要に応じて。

Not implementing this method is the same as returning true. このメソッドを実装しないことは、trueを返すことと同じです。

See Also 参照

Connection Authentication 接続認証