trust_token.h File Reference

Holds function declarations and data for token. More...

#include <axiom.h>
#include <axutil_utils.h>
#include <trust_constants.h>

Go to the source code of this file.

Typedefs

typedef struct trust_token trust_token_t

Enumerations

enum  trust_token_state_t { ISSUED = 1, EXPIRED, CANCELED, RENEWED }

Functions

AXIS2_EXTERN trust_token_t * trust_token_create (const axutil_env_t *env, axis2_char_t *id, axiom_node_t *token_node, axiom_node_t *life_node)
AXIS2_EXTERN trust_token_t * trust_token_create_with_dates (const axutil_env_t *env, axis2_char_t *id, axiom_node_t *token_node, axutil_date_time_t *created, axutil_date_time_t *expire)
AXIS2_EXTERN axis2_status_t trust_token_process_life_elem (const axutil_env_t *env, axiom_node_t *life_node, trust_token_t *token)
AXIS2_EXTERN axis2_bool_t trust_token_is_changed (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_changed (const axutil_env_t *env, trust_token_t *token, axis2_bool_t changed)
AXIS2_EXTERN trust_token_state_t trust_token_get_state (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_state (const axutil_env_t *env, trust_token_t *token, trust_token_state_t state)
AXIS2_EXTERN axiom_node_t * trust_token_get_token (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_token (const axutil_env_t *env, trust_token_t *token, axiom_node_t *token_node)
AXIS2_EXTERN axis2_char_t * trust_token_get_id (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axiom_node_t * trust_token_get_previous_token (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_previous_token (const axutil_env_t *env, trust_token_t *token, axiom_node_t *prev_token)
AXIS2_EXTERN axiom_node_t * trust_token_get_attached_reference (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_attached_reference (const axutil_env_t *env, trust_token_t *token, axiom_node_t *attached_reference)
AXIS2_EXTERN axiom_node_t * trust_token_get_unattached_reference (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_unattached_reference (const axutil_env_t *env, trust_token_t *token, axiom_node_t *unattached_reference)
AXIS2_EXTERN axutil_date_time_t * trust_token_get_created (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_created (const axutil_env_t *env, trust_token_t *token, axutil_date_time_t *created)
AXIS2_EXTERN axutil_date_time_t * trust_token_get_expires (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_expires (const axutil_env_t *env, trust_token_t *token, axutil_date_time_t *expire)
AXIS2_EXTERN axis2_char_t * trust_token_get_issuer_address (const axutil_env_t *env, trust_token_t *token)
AXIS2_EXTERN axis2_status_t trust_token_set_issuer_address (const axutil_env_t *env, trust_token_t *token, axis2_char_t *issuer_address)


Detailed Description

Holds function declarations and data for token.


Function Documentation

AXIS2_EXTERN trust_token_t* trust_token_create ( const axutil_env_t *  env,
axis2_char_t *  id,
axiom_node_t *  token_node,
axiom_node_t *  life_node 
)

Create trust token with given id, token node and life element data

Parameters:
env const pointer to axutil environment
id Token identifier
toke_node Actual token axiom node
life_node Life axiom node containing created and expire dates
Returns:
pointer to trust_token_t

AXIS2_EXTERN trust_token_t* trust_token_create_with_dates ( const axutil_env_t *  env,
axis2_char_t *  id,
axiom_node_t *  token_node,
axutil_date_time_t *  created,
axutil_date_time_t *  expire 
)

Create trust token with given id, token node, created date and expire date

Parameters:
env const pointer to axutil environment
id Token identifier
toke_node Actual token axiom node
created Date which token is created
expire Date which token will expire
Returns:
pointer to trust_token_t

AXIS2_EXTERN axiom_node_t* trust_token_get_attached_reference ( const axutil_env_t *  env,
trust_token_t *  token 
)

Parameters:
secret The secret to set.
public void setSecret(byte[] secret) { this.secret = secret; } Get the attached reference of trust token
Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axiom_node_t axiom node pointer for attached reference

AXIS2_EXTERN axutil_date_time_t* trust_token_get_created ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the created date of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axutil_date_time_t ceated date

AXIS2_EXTERN axutil_date_time_t* trust_token_get_expires ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the expire date of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axutil_date_time_t expire date

AXIS2_EXTERN axis2_char_t* trust_token_get_id ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the identifier of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axis2_char_t identifier string of token

AXIS2_EXTERN axis2_char_t* trust_token_get_issuer_address ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the issuer's address of token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axis2_char_t* issuer's address

AXIS2_EXTERN axiom_node_t* trust_token_get_previous_token ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the actual previous token om node of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axiom_node_t axiom node pointer for previous token

AXIS2_EXTERN trust_token_state_t trust_token_get_state ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the state of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
trust_token_state_t token's state can be ISSUED, EXPIRED, CANCELLED, RENEWED

AXIS2_EXTERN axiom_node_t* trust_token_get_token ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the actual token om node of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axiom_node_t axiom node pointer for token

AXIS2_EXTERN axiom_node_t* trust_token_get_unattached_reference ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the unattached reference of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axiom_node_t axiom node pointer for unattached reference

AXIS2_EXTERN axis2_bool_t trust_token_is_changed ( const axutil_env_t *  env,
trust_token_t *  token 
)

Get the change status of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
Returns:
axis2_bool_t whether the token is changed or not

AXIS2_EXTERN axis2_status_t trust_token_process_life_elem ( const axutil_env_t *  env,
axiom_node_t *  life_node,
trust_token_t *  token 
)

Process the life element of the token which represent by the following xml format assign values to related fields. <wst:LifeTime> <wsu:Created>...</wsu:Created> <wsu:Expires>...</wsu:Expires> </wst:LifeTime>

Parameters:
env const pointer to axutil environment
life_node Axiom node containing created and expire dates
token Trust token containing token data
Returns:
status of the life element processing

AXIS2_EXTERN axis2_status_t trust_token_set_attached_reference ( const axutil_env_t *  env,
trust_token_t *  token,
axiom_node_t *  attached_reference 
)

Set the attached reference of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
attached_reference axiom node pointer for attached reference
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_changed ( const axutil_env_t *  env,
trust_token_t *  token,
axis2_bool_t  changed 
)

Set the change status of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
changed Bollean value representing the if token is changed
Returns:
axis2_status_t whether the operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_created ( const axutil_env_t *  env,
trust_token_t *  token,
axutil_date_time_t *  created 
)

Set the created date of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
created date which token is created
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_expires ( const axutil_env_t *  env,
trust_token_t *  token,
axutil_date_time_t *  expire 
)

Set the expire date of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
expire Expire date of token
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_issuer_address ( const axutil_env_t *  env,
trust_token_t *  token,
axis2_char_t *  issuer_address 
)

Set the issuer's address of token

Parameters:
env const pointer to axutil environment
token Trust token structure
issuer_address issure's address string
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_previous_token ( const axutil_env_t *  env,
trust_token_t *  token,
axiom_node_t *  prev_token 
)

Set the actual token om node of trust token's previous token

Parameters:
env const pointer to axutil environment
token Trust token structure
prev_token axiom node pointer for previous token
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_state ( const axutil_env_t *  env,
trust_token_t *  token,
trust_token_state_t  state 
)

Set the state of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
state State of the trust token
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_token ( const axutil_env_t *  env,
trust_token_t *  token,
axiom_node_t *  token_node 
)

Set the actual token om node of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
token_node axiom node pointer for token
Returns:
axis2_status_t whether the set operation is successful or not

AXIS2_EXTERN axis2_status_t trust_token_set_unattached_reference ( const axutil_env_t *  env,
trust_token_t *  token,
axiom_node_t *  unattached_reference 
)

Set the unattached reference of trust token

Parameters:
env const pointer to axutil environment
token Trust token structure
attached_reference axiom node pointer for unattached reference
Returns:
axis2_status_t whether the set operation is successful or not


Generated on Wed Oct 14 01:02:16 2009 for Rampart/C by  doxygen 1.5.7.1