shibboleth-3.5.0

Public Member Functions | Protected Member Functions | List of all members
shibsp::AbstractSPRequest Class Reference

Abstract base for SPRequest implementations. More...

`#include <shibsp/AbstractSPRequest.h>`

Inheritance diagram for shibsp::AbstractSPRequest:

## Public Member Functions
const ServiceProvider & | getServiceProvider () const
| Returns the locked ServiceProvider processing the request. More...
RequestMapper::Settings | getRequestSettings () const
| Returns RequestMapper Settings associated with the request, guaranteed to be valid for the request's duration. More...
const Application & | getApplication () const
| Returns the Application governing the request. More...
Session * | getSession (bool checkTimeout=true, bool ignoreAddress=false, bool cache=true)
| Returns a locked Session associated with the request. More...
const char * | getRequestURI () const
const char * | getRequestURL () const
std::string | getRemoteAddr () const
const char * | getParameter (const char *name) const
std::vector< constchar * >::size_type | getParameters (const char *name, std::vector< const char * > &values) const
const char * | getHandlerURL (const char *resource=nullptr) const
| Returns the effective base Handler URL for a resource, or the current request URL. More...
std::string | getSecureHeader (const char *name) const
| Returns a non-spoofable request header value, if possible. More...
const char * | getCookie (const char *name) const
void | setAuthType (const char *authtype)
| Establish AUTH_TYPE for request. More...
void | setCookie (const char *name, const char *value, time_t expires=0, samesite_t sameSite=SAMESITE_ABSENT)
void | log (SPLogLevel level, const std::string &msg) const
| Log to native server environment. More...
bool | isPriorityEnabled (SPLogLevel level) const
| Test logging level. More...
Public Member Functions inherited from shibsp::SPRequest
virtual const ServiceProvider & | getServiceProvider () const =0
| Returns the locked ServiceProvider processing the request. More...
virtual RequestMapper::Settings | getRequestSettings () const =0
| Returns RequestMapper Settings associated with the request, guaranteed to be valid for the request's duration. More...
virtual const Application & | getApplication () const =0
| Returns the Application governing the request. More...
virtual Session * | getSession (bool checkTimeout=true, bool ignoreAddress=false, bool cache=true)=0
| Returns a locked Session associated with the request. More...
virtual const char * | getHandlerURL (const char *resource=nullptr) const =0
| Returns the effective base Handler URL for a resource, or the current request URL. More...
virtual std::string | getSecureHeader (const char *name) const =0
| Returns a non-spoofable request header value, if possible. More...
virtual void | clearHeader (const char *rawname, const char *cginame)=0
| Ensures no value exists for a request header. More...
virtual void | setHeader (const char *name, const char *value)=0
| Sets a value for a request header. More...
virtual void | setRemoteUser (const char *user)=0
| Establish REMOTE_USER identity in request. More...
virtual void | setAuthType (const char *authtype)=0
| Establish AUTH_TYPE for request. More...
virtual void | log (SPLogLevel level, const std::string &msg) const =0
| Log to native server environment. More...
virtual bool | isPriorityEnabled (SPLogLevel level) const =0
| Test logging level. More...
virtual long | returnDecline ()=0
| Indicates that processing was declined, meaning no action is required during this phase of processing. More...
virtual long | returnOK ()=0
| Indicates that processing was completed. More...

## Protected Member Functions
| AbstractSPRequest (const char *category)
| Constructor. More...
void | setRequestURI (const char *uri)
| Stores a normalized request URI to ensure it contains no %-encoded characters or other undesirable artifacts. More...

## Additional Inherited Members
Public Types inherited from shibsp::SPRequest
enum | SPLogLevel { SPDebug , SPInfo , SPWarn , SPError , SPCrit }
| Portable logging levels.

## Detailed Description

Abstract base for SPRequest implementations.

## Constructor & Destructor Documentation

## ◆ AbstractSPRequest()

shibsp::AbstractSPRequest::AbstractSPRequest | ( | const char * | category | ) |
| protected

Constructor.

Parameters

  category | logging category to use

## Member Function Documentation

## ◆ getApplication()

const Application & shibsp::AbstractSPRequest::getApplication | ( |  | ) | const
| virtual

Returns the Application governing the request.

Returns
  reference to Application

Implements shibsp::SPRequest.

## ◆ getHandlerURL()

const char * shibsp::AbstractSPRequest::getHandlerURL | ( | const char * | resource = `nullptr` | ) | const
| virtual

Returns the effective base Handler URL for a resource, or the current request URL.

Parameters

  resource | resource URL to compute handler for

Returns
  base location of handler

Implements shibsp::SPRequest.

## ◆ getRequestSettings()

RequestMapper::Settings shibsp::AbstractSPRequest::getRequestSettings | ( |  | ) | const
| virtual

Returns RequestMapper Settings associated with the request, guaranteed to be valid for the request's duration.

Returns
  copy of settings

Implements shibsp::SPRequest.

## ◆ getSecureHeader()

std::string shibsp::AbstractSPRequest::getSecureHeader | ( | const char * | name | ) | const
| virtual

Returns a non-spoofable request header value, if possible.

Platforms that support environment export can redirect header lookups by overriding this method.

Parameters

  name | the name of the secure header to return

Returns
  the header's value, or an empty string

Implements shibsp::SPRequest.

## ◆ getServiceProvider()

const ServiceProvider & shibsp::AbstractSPRequest::getServiceProvider | ( |  | ) | const
| virtual

Returns the locked ServiceProvider processing the request.

Returns
  reference to ServiceProvider

Implements shibsp::SPRequest.

## ◆ getSession()

Session * shibsp::AbstractSPRequest::getSession | ( | bool | checkTimeout = `true`,
|  | bool | ignoreAddress = `false`,
|  | bool | cache = `true`
| ) |  |
| virtual

Returns a locked Session associated with the request.

Parameters

  checkTimeout | true iff the last-used timestamp should be updated and any timeout policy enforced
  ignoreAddress | true iff all address checking should be ignored, regardless of policy
  cache | true iff the request should hold the Session lock itself and unlock during cleanup

Returns
  pointer to Session, or nullptr

Implements shibsp::SPRequest.

## ◆ isPriorityEnabled()

bool shibsp::AbstractSPRequest::isPriorityEnabled | ( | SPLogLevel | level | ) | const
| virtual

Test logging level.

Parameters

  level | logging level

Returns
  true iff logging level is enabled

Implements shibsp::SPRequest.

## ◆ log()

void shibsp::AbstractSPRequest::log | ( | SPLogLevel | level,
|  | const std::string & | msg
| ) |  | const
| virtual

Log to native server environment.

Parameters

  level | logging level
  msg | message to log

Implements shibsp::SPRequest.

## ◆ setAuthType()

void shibsp::AbstractSPRequest::setAuthType | ( | const char * | authtype | ) |
| virtual

Establish AUTH_TYPE for request.

Parameters

  authtype | AUTH_TYPE value to set or nullptr to clear

Implements shibsp::SPRequest.

## ◆ setRequestURI()

void shibsp::AbstractSPRequest::setRequestURI | ( | const char * | uri | ) |
| protected

Stores a normalized request URI to ensure it contains no %-encoded characters or other undesirable artifacts.

Parameters

  uri | the request URI as obtained from the client

The documentation for this class was generated from the following file:

- shibsp/AbstractSPRequest.h