anchor.diff:  -export([authorize/2, normalize/1]).
   
   -export_type([eap_method/0]).
  --export([bucket_balance/1]).
   
   -include("ocs.hrl").
   -include_lib("inets/include/mod_auth.hrl").
  
positive.code: 									{_, _, _} ->
  										throw(bad_password)
  								end;
  							Balance when Balance =< 0 ->
  								throw(out_of_credit)
  						end;
  					[] ->
  
negative.code: 				case mnesia:read(subscriber, Identity, write) of
  					[#subscriber{buckets = Buckets, attributes = Attributes,
  							enabled = Enabled, disconnect = Disconnect} = Entry] ->
  						F2 = fun(#bucket{remain_amount = RM}) when
  											RM#remain_amount.amount > 0 ->
  										true;
  									(_) ->
  										false
  						end,
  						case lists:any(F2, Buckets) of
  							true ->
  								case {Enabled, Disconnect, Entry#subscriber.password} of
  									{true, false, Password} ->
  										{Password, Attributes};
  