You'll need to configure the package for your OpenAM server. First publish the vendor assets:
$ php artisan vendor:publish
which will create a config/openam.php file in your app where you can modify it to reflect
your OpenAM server.
Finally make sure to change the value for the driver key to openam in config/auth.php.
There is also an option to use an Eloquent model as the user object for OpenAM authentication. This is useful if
you want to authenticate against OpenAM but want to control authorisation within Laravel e.g. using
Ideally the default App\User class found in a new install of Laravel is perfect for this. Modify the
eloquentModel key to refer to the Eloquent class you want and the eloquentUid key to store the OpenAM uid into your
user table column in the config/openam.php file e.g.
You have to also make sure you add your OpenAM cookie name into the except array found in the middleware
app/Http/Middleware/EncryptCookies.php so the token value isn't encrypted as it will need to be validated during
You can either hard code it or do the following in app/Http/Middleware/EncryptCookies.php making sure you
import the Closure class into the middleware:
/** * The names of the cookies that should not be encrypted. * * @var array */protected$except = [
$this->except = config('openam.cookieName');
Now your Auth driver is using OpenAM you will be able to use the Laravel's Auth class to authenticate users.
//Authenticating using the OpenAM TokenID from a cookieAuth::attempt();
//Authenticating using user input$input = Input::only('username', 'password');
//Retrieving the OpenAM attributes of a logged in user$user = Auth::user();