ExFTP.Auth.NoAuth (ExFTP v1.0.4)
View SourceWhen authenticator is ExFTP.Auth.NoAuth
, this authenticator will completely ignore any supplied credentials and
assume everything is authenticated.
๐ Security
Don't use NoAuth
for production servers.
โ๏ธ Configuration
Keys
- authenticator ==
ExFTP.Auth.NoAuth
- authenticator_config ==
%{}
Example
%{
# ... ,
authenticator: ExFTP.Auth.NoAuth,
authenticator_config: %{}
}
๐ See Also
๐ Resources
- ๐ RFC 959 (section-4)
- ๐ RFC 3659
- ๐ฌ Contact the maintainer (he's happy to help!)
Summary
Functions
@spec authenticated?(authenticator_state :: ExFTP.Authenticator.authenticator_state()) :: boolean()
Assumes the user is always authenticated
๐ท๏ธ Params
- authenticator_state ::
ExFTP.Authenticator.authenticator_state/0
โคต๏ธ Returns
โ On Success
`true`
๐ป Examples
iex> alias ExFTP.Auth.NoAuth
iex> NoAuth.authenticated?(%{authenticated: true})
true
iex> NoAuth.authenticated?(%{})
true
๐ Resources
- ๐ RFC 959 (section-4)
- ๐ RFC 3659
- ๐ฌ Contact the maintainer (he's happy to help!)
@spec login( password :: ExFTP.Authenticator.password(), authenticator_state :: ExFTP.Authenticator.authenticator_state() ) :: {:ok, ExFTP.Authenticator.authenticator_state()} | {:error, term()}
Login will always succeed.
๐ท๏ธ Params
- password ::
ExFTP.Authenticator.password/0
- authenticator_state ::
ExFTP.Authenticator.authenticator_state/0
โคต๏ธ Returns
โ On Success
{:ok, authenticator_state}
๐ป Examples
iex> alias ExFTP.Auth.NoAuth
iex> {:ok, _auth_state} = NoAuth.login("password", %{username: "jsmith"})
iex> {:ok, _} = NoAuth.login("password", %{})
iex> {:ok, _} = NoAuth.login("password", %{username: "root"})
@spec valid_user?(username :: ExFTP.Authenticator.username()) :: boolean()
Always returns true
๐ท๏ธ Params
- username ::
ExFTP.Authenticator.username/0
โคต๏ธ Returns
โ On Success
`true`
๐ป Examples
iex> alias ExFTP.Auth.NoAuth
iex> NoAuth.valid_user?("jsmith")
true
iex> NoAuth.valid_user?("root")
true