auth (kernel v8.0.2)
This module is deprecated. For a description of the Magic Cookie system, refer to Distributed Erlang in the Erlang Reference Manual.
Link to this section Summary
Functions
Use erlang:get_cookie()
in ERTS instead.
Use erlang:set_cookie(node(), Cookie)
in ERTS instead.
Returns yes
if communication with Node
is authorized. Notice that a connection to Node
is established in this case. Returns no
if Node
does not exist or communication is not authorized (it has another cookie than auth
thinks it has).
- Node = node()
- Cookie =
cookie()
Equivalent to node_cookie(Node, Cookie)
.
Sets the magic cookie of Node
to Cookie
and verifies the status of the authorization. Equivalent to calling erlang:set_cookie(Node, Cookie)
, followed by auth:is_auth(Node)
.
Link to this section Types
-type cookie() :: term().
Specs
cookie() :: atom().
Link to this section Functions
cookie/0
Specs
cookie() -> Cookie when Cookie :: cookie().
Use erlang:get_cookie()
in ERTS instead.
cookie/1
Specs
cookie(TheCookie) -> true when TheCookie :: Cookie | [Cookie], Cookie :: cookie().
Use erlang:set_cookie(node(), Cookie)
in ERTS instead.
is_auth/1
Specs
is_auth(Node) -> yes | no when Node :: node().
Returns yes
if communication with Node
is authorized. Notice that a connection to Node
is established in this case. Returns no
if Node
does not exist or communication is not authorized (it has another cookie than auth
thinks it has).
Use net_adm:ping(Node)
instead.
node_cookie([Node, Cookie]) -> yes | no
Specs
node_cookie(Cookies :: [node() | cookie(), ...]) -> yes | no.
- Node = node()
- Cookie =
cookie()
Equivalent to node_cookie(Node, Cookie)
.
node_cookie/2
Specs
node_cookie(Node, Cookie) -> yes | no when Node :: node(), Cookie :: cookie().
Sets the magic cookie of Node
to Cookie
and verifies the status of the authorization. Equivalent to calling erlang:set_cookie(Node, Cookie)
, followed by auth:is_auth(Node)
.