# \OneLogin_Saml2_AuthnRequest

SAML 2 Authentication Request

## Summary

Methods
Properties
Constants
__construct()
getRequest()
getId()
getXML()
No public properties found
No constants found
No protected methods found
$_settings
N/A
No private methods found
$_authnRequest
$_id
N/A

File
  AuthnRequest.php
Package
  Default
Class hierarchy
  \OneLogin_Saml2_AuthnRequest

## Tags

None found

## Properties

### $_settings

    $_settings : \OneLogin_Saml2_Settings

Object that represents the setting info

#### Type

\OneLogin_Saml2_Settings

#

## Tags

None found

### $_authnRequest

    $_authnRequest : string

SAML AuthNRequest string

#### Type

string

#

## Tags

None found

### $_id

    $_id : string

SAML AuthNRequest ID.

#### Type

string

#

## Tags

None found

## Methods

### __construct()

    __construct(\OneLogin_Saml2_Settings  $settings, boolean  $forceAuthn = false, boolean  $isPassive = false, boolean  $setNameIdPolicy = true, string  $nameIdValueReq = null)

Constructs the AuthnRequest object.

#### Parameters

\OneLogin_Saml2_Settings | $settings | Settings
boolean | $forceAuthn | When true the AuthNReuqest will set the ForceAuthn='true'
boolean | $isPassive | When true the AuthNReuqest will set the Ispassive='true'
boolean | $setNameIdPolicy | When true the AuthNReuqest will set a nameIdPolicy
string | $nameIdValueReq | Indicates to the IdP the subject that should be authenticated

#

## Tags

None found

### getRequest()

    getRequest(boolean|null  $deflate = null) : string

Returns deflated, base64 encoded, unsigned AuthnRequest.

#### Parameters

boolean|null | $deflate | Whether or not we should 'gzdeflate' the request body before we return it.

#### Returns

string

#

## Tags

None found

### getId()

    getId() : string

Returns the AuthNRequest ID.

#### Returns

string

#

## Tags

None found

### getXML()

    getXML() : string

Returns the XML that will be sent as part of the request

#### Returns

string

#

## Tags

None found

### AuthnRequest.php