Location: PHPKode > projects > Noti > doc/core/noti/Auth.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Auth</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Auth</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The Auth class provides all primites required for the authentication layer</p>
	<ul class="tags">
				<li><span class="field">since:</span> Noti 0.5.0</li>
				<li><span class="field">version:</span> $Revision: 1.3 $</li>
				<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/gpl.txt">GPL</a></li>
				<li><span class="field">author:</span> Pablo Hoffman &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Auth_class.html">/Auth.class</a> (line <span class="field">24</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_user" title="details" class="var-name">$_user</a>
				</div>
							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#adminOnly" title="details" class="method-name">adminOnly</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#canPost" title="details" class="method-name">canPost</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$ulogin</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$upass</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#isAdmin" title="details" class="method-name">isAdmin</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#login" title="details" class="method-name">login</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$ulogin</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$upass</span>, [<span class="var-type">optional</span>&nbsp;<span class="var-name">$remember</span> = <span class="var-default">false</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#logout" title="details" class="method-name">logout</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">object The</span>
										<a href="#singleton" title="details" class="method-name">&amp;singleton</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#user" title="details" class="method-name">user</a>
										()
									</div>
							</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$_user" id="$_user"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_user</span>
						(line <span class="line-number">26</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</div>

						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodadminOnly" id="adminOnly"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">adminOnly</span> (line <span class="line-number">101</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Redirects to login page if the logged user is not an administrator</p>
	<ul class="tags">
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			adminOnly
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodcanPost" id="canPost"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">canPost</span> (line <span class="line-number">118</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns TRUE if a user/password is valid and the user can upload  news.</p>
	<ul class="tags">
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			canPost
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$ulogin</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$upass</span>)
			</div>
	
		
		
	</div>
<a name="methodisAdmin" id="isAdmin"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isAdmin</span> (line <span class="line-number">81</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns TRUE if the logged user is an administator</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			isAdmin
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodlogin" id="login"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">login</span> (line <span class="line-number">143</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Authenticate and login a user. Return the User if success or FALSE  otherwise.</p>
	<ul class="tags">
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			login
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$ulogin</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$upass</span>, [<span class="var-type">optional</span>&nbsp;<span class="var-name">$remember</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$ulogin</span><span class="var-description">: The user login</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$upass</span><span class="var-description">: The user passwordk</span>			</li>
					<li>
				<span class="var-type">optional</span>
				<span class="var-name">$remember</span><span class="var-description">: string $remember    Remember user among browser                                      sessions</span>			</li>
				</ul>
		
		
	</div>
<a name="methodlogout" id="logout"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">logout</span> (line <span class="line-number">176</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Logouts and de-authenticate a user. Return the User if success or FALSE  otherwise.</p>
	<ul class="tags">
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			logout
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodsingleton" id="singleton"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">singleton</span> (line <span class="line-number">37</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a reference to the global Auth object, only  creating it if it doesn't already exist.</p>
<p class="description"><p>This method must be invoked as: $auth = &amp;Auth::singleton()</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Noti Authentication instance.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">object The</span>
		<span class="method-name">
			&amp;singleton
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methoduser" id="user"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">user</span> (line <span class="line-number">54</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the logged user (if any) or FALSE otherwise</p>
	<ul class="tags">
				<li><span class="field">return:</span> User       The note (if exists). False otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			user
		</span>
				()
			</div>
	
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sat, 18 Mar 2006 04:40:11 -0300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>
Return current item: Noti