Documentation
¶
Index ¶
- type AnyType
- type AnyURI
- type BeginTransaction
- type BeginTransactionResponse
- type EndSession
- type EndSessionResponse
- type EndTransaction
- type EndTransactionResponse
- type HasSubject
- type HasSubjectResponse
- type LogIn
- type LogInResponse
- type LogInWithToken
- type LogInWithTokenResponse
- type NCName
- type SessionWebService
- type TransactionExists
- type TransactionExistsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeginTransaction ¶
type EndSession ¶
type EndSessionResponse ¶
type EndTransaction ¶
type EndTransactionResponse ¶
type HasSubject ¶
type HasSubjectResponse ¶
type 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 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 ¶
Click to show internal directories.
Click to hide internal directories.