VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
List of all members
Com::Vmware::Vapi::Dsig::SecurityContextFactory Class Reference

## Avaliable Methods
public method | create_session_security_context ()
public method | parse_session_security_context ()
public method | create_saml_security_context ()
public method | new ()

## Member Function Documentation

public method Com::Vmware::Vapi::Dsig::SecurityContextFactory::create_saml_security_context | ( |  | ) |

Creates a SAML token security context

Parameters

  token | - The token that should be used for authentication
  private_key | - The private key that should be used to sign the request

Return values

  Com::Vmware::Vapi::Dsig::SamlTokenSecurityContext | object

Code:
click to view
# Number of lines of code in create_saml_security_context: 15
sub create_saml_security_context {
my ( $self, %args ) = @_;
my $token = $args{'token'};
my $privateKey = $args{'private_key'};
if (!defined($privateKey)){
#To remove host verification
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
}
return Com::Vmware::Vapi::Dsig::SamlTokenSecurityContext->new(
saml_token => $token,
private_key => $privateKey
);
}

public method Com::Vmware::Vapi::Dsig::SecurityContextFactory::create_session_security_context | ( |  | ) |

Creates a security context which represents and attempt to reuse an existing session. This is only usable with session-aware services. Such attempt would succeed only if the client has already been authenticated by the service and has a valid session with it.

Parameters

  session_id | - session id

Return values

  Com::Vmware::Vapi::Security::SessionSecurityContext | object

Code:
click to view
# Number of lines of code in create_session_security_context: 7
sub create_session_security_context {
my ( $self, %args ) = @_;
my $sessionId = $args{'session_id'};
return Com::Vmware::Vapi::Security::SessionSecurityContext->new(
session_id => $sessionId );
}

public method Com::Vmware::Vapi::Dsig::SecurityContextFactory::new | ( |  | ) |

Constructor for creating SecurityContextFactory

Parameters

  None |

Return values

  Blessed object | Code: click to view # Number of lines of code in new: 6 sub new { my ( $class, %args ) = @_; my $self = {}; return bless( $self, $class ); }

public method Com::Vmware::Vapi::Dsig::SecurityContextFactory::parse_session_security_context | ( |  | ) |

Parses the SecurityContext looking for session information

Parameters

  security_context | - Com::Vmware::Vapi::Core::SecurityContext object

Return values

  Com::Vmware::Vapi::Security::SessionSecurityContext | object

Code:
click to view
# Number of lines of code in parse_session_security_context: 7
sub parse_session_security_context {
my ( $self, %args ) = @_;
my $securityContext = $args{'security_context'};
return Com::Vmware::Vapi::Security::SessionSecurityContext->newInstance(
security_context => $securityContext );
}

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

- Com/Vmware/Vapi/Dsig/SecurityContextFactory.pm