session_ws

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyType

type AnyType struct {
	InnerXML string `xml:",innerxml"`
}

type AnyURI

type AnyURI string

type BeginTransaction

type BeginTransaction struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl beginTransaction"`
}

type BeginTransactionResponse

type BeginTransactionResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl beginTransactionResponse"`
}

type EndSession

type EndSession struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl endSession"`
}

type EndSessionResponse

type EndSessionResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl endSessionResponse"`
}

type EndTransaction

type EndTransaction struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl endTransaction"`

	Rollback bool `xml:"rollback,omitempty" json:"rollback,omitempty"`
}

type EndTransactionResponse

type EndTransactionResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl endTransactionResponse"`
}

type HasSubject

type HasSubject struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl hasSubject"`
}

type HasSubjectResponse

type HasSubjectResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl hasSubjectResponse"`

	HasSubjectReturn bool `xml:"hasSubjectReturn,omitempty" json:"hasSubjectReturn,omitempty"`
}

type LogIn

type LogIn struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl logIn"`

	UserName string `xml:"userName,omitempty" json:"userName,omitempty"`

	Password string `xml:"password,omitempty" json:"password,omitempty"`
}

type LogInResponse

type LogInResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl logInResponse"`
}

type LogInWithToken

type LogInWithToken struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl logInWithToken"`

	Mechanism string `xml:"mechanism,omitempty" json:"mechanism,omitempty"`

	Username string `xml:"username,omitempty" json:"username,omitempty"`

	Token string `xml:"token,omitempty" json:"token,omitempty"`
}

type LogInWithTokenResponse

type LogInWithTokenResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl logInWithTokenResponse"`
}

type NCName

type NCName string

type SessionWebService

type SessionWebService interface {
	/*
		Starts a explicit transaction for the current session.
		Usually transactions are started and committed for each call to the webservice, but if a transaction has been started explicitly it also has to be terminated using endTransaction.    */
	BeginTransaction(request *BeginTransaction) (*BeginTransactionResponse, error)

	BeginTransactionContext(ctx context.Context, request *BeginTransaction) (*BeginTransactionResponse, error)

	/*
		Terminates the current session.    */
	EndSession(request *EndSession) (*EndSessionResponse, error)

	EndSessionContext(ctx context.Context, request *EndSession) (*EndSessionResponse, error)

	/*
		Ends the explicit transaction of the current session by either commit or rollback.
		@param rollback if true the transaction is rolled back otherwise it is commited.    */
	EndTransaction(request *EndTransaction) (*EndTransactionResponse, error)

	EndTransactionContext(ctx context.Context, request *EndTransaction) (*EndTransactionResponse, error)

	/*
		Checks if a user is logged in for the current session.    */
	HasSubject(request *HasSubject) (*HasSubjectResponse, error)

	HasSubjectContext(ctx context.Context, request *HasSubject) (*HasSubjectResponse, error)

	/*
		Logs a user in for the current session.
		@param userName the name of the user to log-in.
		@param password the password of the user to log-in.    */
	LogIn(request *LogIn) (*LogInResponse, error)

	LogInContext(ctx context.Context, request *LogIn) (*LogInResponse, error)

	/*
		This method works for both Teamcenter Security Services SSO and Personal Access Tokens (since Polarion 3.22.1).
		Possible (case insensitive) values for the mechanism parameters: TcSS and AccessToken.

		This will NOT work for the other SSO methods supported by Polarion. (Kerberos, SAML, or OAuth2.)
		For SAML, OAuth2 (or deprecated Kerberos), you should use the SessionWebService.logIn(username, password) method (LDAP configuration should be enabled for web services) or use an access token.

		@param mechanism the mechanism that the client requests for authentication. If the TcSS mechanism is used, the server must be configured for TcSS. (Otherwise, the login with this mechanism will be rejected.) AccessToken is always accepted.
		@param username the name of the user to login. Required for TcSS. null for AccessToken
		@param token the token of the user to login.
		@since 3.17.0    */
	LogInWithToken(request *LogInWithToken) (*LogInWithTokenResponse, error)

	LogInWithTokenContext(ctx context.Context, request *LogInWithToken) (*LogInWithTokenResponse, error)

	/*
		Check if there is a explicit transaction (started with beginTransaction) for the current session.    */
	TransactionExists(request *TransactionExists) (*TransactionExistsResponse, error)

	TransactionExistsContext(ctx context.Context, request *TransactionExists) (*TransactionExistsResponse, error)
}

func NewSessionWebService

func NewSessionWebService(client *soap.Client) SessionWebService

type TransactionExists

type TransactionExists struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl transactionExists"`
}

type TransactionExistsResponse

type TransactionExistsResponse struct {
	XMLName xml.Name `xml:"http://ws.polarion.com/SessionWebService-impl transactionExistsResponse"`

	TransactionExistsReturn bool `xml:"transactionExistsReturn,omitempty" json:"transactionExistsReturn,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL