|
Core API 7.14 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.juniper.smgt.sae.portal.User
public class User
This bean represents a user currently logged in to SAE.
The current value of any of this bean's userIp
property or its
userDn
property or its sessionId
property determines which logged in user
this bean represents.
This bean's userIp
or userDn
or sessionId
property
must be set before any other properties are read.
If the user is represented by a userIp
property, it
is recommended to also set the timeStamp
property. The timeStamp
identifies a point in time,
when the IP address was assigned to the user. Using this feature
is especially important, if a reference to this bean is kept
inside a session for a longer time.
The userDn
property
can only be used to initialize this bean to represent an interface user. In general, an interface user
is a user that is logged in to SAE in response to an E-series router interface coming up (except for most authenticated PPP interfaces).
Constructor Summary | |
---|---|
User()
The default bean constructor. |
Method Summary | |
---|---|
void |
addScheduleEntry(ScheduleEntry aSE)
Adds a ScheuldeEntry for the Subscriber. |
java.lang.String[] |
addSubscription(java.lang.String serviceName,
java.lang.String userName,
java.lang.String password)
Subscribes the currently logged in user to the service specified by serviceName . |
java.lang.String[] |
addSubscription(java.lang.String serviceName,
java.lang.String userName,
java.lang.String password,
java.util.Map attributes)
Subscribes the currently logged in user to the service specified by serviceName . |
void |
deleteScheduleEntry(long date)
Deprecated. Use deleteScheduleEntry(String id) instead. Convert long date to string date using String.valueOf(date). |
void |
deleteScheduleEntry(java.lang.String id)
Delete the ScheduleEntry for the Subscriber for the given date. |
java.lang.String[] |
deleteSubscription(java.lang.String serviceName,
java.lang.String userName,
java.lang.String password)
Unsubscribes the currently logged in user from the service specified by serviceName . |
void |
disconnect()
Disconnects a user from the SAE. |
java.lang.String[] |
getActiveSubscriptionNames()
Returns the name of every service that is currently activated for this user. |
java.lang.Object |
getAttribute(java.lang.String attributeName)
Returns the value of the named attribute from this user's entry in SAE's LDAP user directory. |
java.lang.String[] |
getAttributeNames()
Get the names of the LDAP attributes defined for the profile of the current user. |
java.util.Set |
getAuthDeniedReasons()
Those users who connect via authenticated PPP or DHCP, and whose automatic login (based on the PPP or DHCP session information, or on a registered login) was denied due to an authorization failure, will be assigned a copy of the unauthenticated user profile, and a set of messages explaining why the automatic login was denied will be available via this method (there may be more than one reason authorization was denied). |
java.lang.String |
getAutoSubscriptions()
Returns subscriptions to be activated on login, set by RADIUS auth plugin. |
java.lang.String[] |
getAvailableServiceNames()
Returns the names of every service currently available for this user session |
java.lang.String[] |
getAvailableSubscriptionNames()
Returns the name of every service that is currently available to this user. |
java.lang.String |
getCallingStationId()
Returns the Calling-Station-Id associated with the primary interface of the subscriber |
java.lang.String[] |
getDelegatedIpv6Prefix()
Returns the delegated IPv6 prefixes of the subscriber in the form "xxxx::/len" |
static java.util.Set |
getDeprecatedProperties()
return a set of deprecated properties. |
DhcpPacket |
getDhcpPacket()
Return information about DHCP request. |
java.lang.String |
getFramedIpv6Prefix()
Return the IPv6 prefix of the subscriber in the form "xxxx::/len" |
java.lang.String[] |
getInterfaceAttributeNames()
Get the names of attributes of the interface which this user is connected. |
java.util.Map |
getInterfaceAttributes()
Get all attributes of the interface which this user is connected. |
java.lang.String |
getIntfAlias()
Returns the alias of the router interface to which this user is connected, as it is configured in the E-series router. |
java.lang.String |
getIntfName()
Returns the name of the router interface to which this user is connected. |
java.lang.String |
getLoadSubscriptions()
Returns the filter for "loaded" subscriptions, set by RADIUS auth plugin. |
java.util.Map |
getLocalQosProfiles()
Get a map of local profiles. |
java.lang.String |
getLocationName()
Return's the name of the user's current location. |
java.lang.String |
getLoginDomain()
Returns this user's login domain (e.g. |
java.lang.String |
getLoginId()
Returns this user's login ID (e.g. |
java.util.Date |
getLoginTime()
Returns the time & date that this user logged in to SAE. |
long |
getLoginTimestamp()
Returns the time that this user logged in to SAE in milliseconds since 1970-01-01T00:00:00 UTC. |
java.lang.String |
getMacAddress()
Returns the user's MAC address as a string (e.g. |
java.lang.String |
getName()
Returns this user's full name (e.g. |
java.lang.String |
getNasIp()
Returns the IP address of the router which this user is connected. |
int |
getNumConcurrentGroupSessions()
Return the number of concurrent logins of the group of the current user profile. |
int |
getNumConcurrentSessions()
Return the number of concurrent logins of the current user profile. |
java.lang.String[] |
getPersonalSubscriptionNames()
Returns the name of every service to which this user is personally subscribed. |
java.lang.String |
getPrimaryUserName()
Return the primary user name of this User Session. |
java.util.Set |
getProperties()
Deprecated. use getPropertyMap instead |
java.util.Map |
getPropertyMap()
Get a map of user session properties. |
java.lang.String |
getPublicDhcpUserName()
Deprecated. Use getPrimaryUserName instead |
java.lang.String[] |
getRadiusClass()
Returns radius class attribute from authorization plug-ins. |
int |
getRemainingSessionTime()
Returns the time in seconds that remain before this user will be automatically logged out from SAE. |
java.lang.String[] |
getReplyMessages()
Return the "reply messages" from the authorization plug-in for the current user session. |
ScheduleEntry[] |
getScheduleEntries()
Get all schedule enteries for the Subscriber. |
ScheduleEntry |
getScheduleEntry(long date)
Deprecated. Use getScheduleEntry(String id) instead. Convert long date to string date using String.valueOf(date). |
ScheduleEntry |
getScheduleEntry(java.lang.String id)
Get the ScheduleEntry for the Subscriber for the given date. |
long[] |
getScheduleEntryEventDates()
Get list of dates for the Subscriber for the Subscriber's schedules. |
java.lang.String[] |
getScheduleEntryIds()
Get list of ids for the Subscriber for the Subscriber's schedules. |
java.util.List |
getScopes()
Return a list of the DN of the user's current scopes dn sorted by scope's precedence and seperated by "\n". |
java.lang.String |
getServiceBundle()
Returns service bundle attribute from authorization plug-ins. |
java.lang.String |
getSessionHandle()
Returns this user's session handle (e.g. |
java.lang.String |
getSessionId()
Returns this user's session ID (e.g. |
java.lang.String |
getSspPassword()
Returns the password attribute from this user's profile in LDAP, exactly as it is stored in the SAE's LDAP directory (i.e. |
java.lang.String[] |
getSubscriptionAndServiceSessionNames()
Returns the name of every service to which this user is subscribed to and the name of subscriptions of active service sessions to which this user is not subscribed to but has an active session (i.e. fragment session from an aggregate service session). |
java.lang.String[] |
getSubscriptionNames()
Returns the name of every service to which this user is subscribed. |
java.lang.String |
getUserDn()
Returns the LDAP distinguished name with which this bean was initialized (e.g. |
java.lang.String |
getUserIp()
Returns the IP address with which this bean was initialized (e.g. |
net.juniper.smgt.sae.session.UserSession |
getUserSession()
Returns the UserSession object that this bean has been initialized to provide access to. |
java.lang.String |
getVirtualRouterName()
Return the virtual router name with which this bean was initialized. |
java.lang.String |
getVpnId()
|
java.lang.String |
getVrName()
Returns the name of the virtual router to which this user is connected. |
void |
grantPublicIp(java.lang.String loginName,
java.lang.String password)
Assigns a public IP address to the specified user. |
void |
grantPublicIp(java.lang.String loginName,
java.lang.String password,
DhcpProfile dhcpProfile)
Assigns a public IP address to the specified user. |
boolean |
isAddressUser()
Returns true only if the user is connected via DHCP. |
boolean |
isAnonymous()
Returns true if the user is anonymous. |
boolean |
isInitialized()
Returns true only if this bean has been fully initialized. |
boolean |
isIspServiceActive()
Deprecated. ISP services are no longer supported |
boolean |
isPppUser()
Deprecated. This method has been deprecated. Returns true only if the user is connected via authenticated PPP. |
boolean |
isPublicDhcpUser()
Deprecated. Use isAddressUser and getPrimaryUserName instead |
boolean |
isTokenDhcpUser()
Deprecated. Use isAddressUser and getPrimaryUserName instead |
boolean |
isUnauthenticated()
Returns true only if the user is unauthenticated. |
boolean |
login(java.lang.String loginName,
java.lang.String password)
Logs a user into SAE. |
void |
logout()
Logs a user out of SAE. |
void |
revokePublicIp()
Revokes the public IP address held by the specified user. |
void |
setProperty(java.lang.String aProperty)
The setProperty() method sets the property attribute of the subscriber session. |
void |
setSessionId(java.lang.String sessionId)
Determines which user will be described or affected by all subsequent calls to this bean's methods. |
void |
setSessionTimeout(int timeout)
Set the Session Timeout for the current user session. |
void |
setTimeStamp(long timeStamp)
Set the time stamp. |
void |
setUserDn(java.lang.String userDn)
Determines which interface user will be described or affected by all subsequent calls to this bean's methods. |
void |
setUserIp(java.lang.String userIp)
Determines which user will be described or affected by all subsequent calls to this bean's methods. |
void |
setVirtualRouterName(java.lang.String aVr)
Set the virtual router name. |
java.lang.String |
toString()
For debugging only. |
void |
updatedScheduleEntry(java.lang.String id,
ScheduledTime aScheduleTime,
Action[] aActions)
Updates the scheduled time and actions of the ScheduleEntry for the Subscriber for the given date. |
void |
updatedScheduleEntryActions(long date,
Action[] aActions)
Deprecated. Use updatedScheduleEntryActions(String id, Action[] aActions) instead. Convert long date to string date using String.valueOf(date). |
void |
updateSessionTimeout(int timeout)
Update the session timeout for the user session object that this bean has been initialized to provide access to. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public User()
Method Detail |
---|
public void setUserIp(java.lang.String userIp) throws UnknownUserException
userIp
property has the side-effect of setting the userDn
property to null.
userIp
- The desired user's current IP address in string format (e.g. "192.168.3.34").
java.lang.IllegalArgumentException
- If the userIp
string does not contain a parseable IP address.
UnknownUserException
- If the specified user is not currently logged in to SAE. In some cases, such as
with some interface users (e.g. some static IP users), SAE may not know a user's
IP address. In such cases,
this method will throw an UnknownUserException
even if a user with the specified IP is logged
in to SAE. Portals that handle static IP users can redirect such users to a login JSP page whenever this
exception is thrown by this method. After calling Ssp.loginUser
for a static IP user, SAE will know
the static IP user's IP address, and this method will no longer throw an UnknownUserException
.Ssp.loginUser(java.lang.String, java.lang.String, java.lang.String)
public void setTimeStamp(long timeStamp) throws UnknownUserException
UnknownUserException
public java.lang.String getUserIp()
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setUserDn(java.lang.String userDn) throws UnknownUserException, NonUniqueUserException
userDn
property has the
side-effect of setting the userIp
property to null.
userDn
- The desired interface user's LDAP distinguished name in string format (e.g. "siteName=OttawaOffice,enterpriseName=XyzCorp,ou=Ottawa,retailername=ISP3,o=Users,o=UMC").
java.lang.IllegalArgumentException
- If the userDn
string does not contain a parseable DN.
UnknownUserException
- If an interface user with the specified DN is not currently logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getUserDn()
userIp
property is no longer logged in to SAE.
since 4.2: Null, if this bean was initialized with an IP address and the user specified by this bean's userIp
property is logged in more than once.
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setSessionId(java.lang.String sessionId) throws UnknownUserException
sessionId
- The desired user's current session ID in string format (e.g. "jane:1113315547138:0").
UnknownUserException
- If the specified user is not currently logged in to SAE.public java.lang.String getSessionId()
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setVirtualRouterName(java.lang.String aVr)
public java.lang.String getVirtualRouterName()
public boolean isInitialized()
sessionId
or userIp
or the userDn
property has been set.
public java.lang.String getName() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.util.Date getLoginTime() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been
properly initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by
this bean's userDn
property is logged in more than
once.public long getLoginTimestamp() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been
properly initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by
this bean's userDn
property is logged in more than
once.public int getRemainingSessionTime() throws UnknownUserException, NonUniqueUserException, java.lang.IllegalStateException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getLoginId() throws UnknownUserException, NonUniqueUserException
Ssp.loginUser
method.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getLoginDomain() throws UnknownUserException, NonUniqueUserException
Ssp.loginUser
method.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getSspPassword() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getLocationName() throws UnknownUserException, NonUniqueUserException
vrName
property.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Service.setLocationName(java.lang.String)
,
getVrName()
public java.util.List getScopes() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getVrName() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getIntfName() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getIntfAlias() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getLoadSubscriptions() throws UnknownUserException, NonUniqueUserException
UnknownUserException
NonUniqueUserException
public java.lang.String getAutoSubscriptions() throws UnknownUserException, NonUniqueUserException
UnknownUserException
NonUniqueUserException
public boolean isUnauthenticated() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Ssp.loginUser(java.lang.String, java.lang.String, java.lang.String)
public java.util.Set getAuthDeniedReasons() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public boolean isAnonymous() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public boolean isAddressUser() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged in
to SAE.
NonUniqueUserException
- If the user specified by this bean's
userDn
property is logged in more than once.public boolean isTokenDhcpUser() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public boolean isPublicDhcpUser() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getPublicDhcpUserName() throws UnknownUserException, NonUniqueUserException
grantPublicIp
method, or
the Ssp.registerEquipment
method.
This user name is of the form "userName@domainName".
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getPrimaryUserName() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this
bean's userDn
property is logged in more than
once.public java.lang.String getMacAddress() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public boolean isIspServiceActive() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String[] getSubscriptionNames() throws UnknownUserException, NonUniqueUserException
getPersonalSubscriptionNames
method)
plus the subscriptions belonging to this user's household or site or enterprise
(i.e. those inherited from this user's "ancestor" user profiles in LDAP).
User Authentication plug-in can set a filter to the subscriptions. In this case,
the list of returned subscriptions can be a subset of the subscribed ones.
These names can be used to initialize the serviceName
property
of a Subscription
bean.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Subscription
,
getPersonalSubscriptionNames()
public java.lang.String[] getSubscriptionAndServiceSessionNames() throws UnknownUserException, NonUniqueUserException
getPersonalSubscriptionNames
method)
plus the subscriptions belonging to this user's household or site or enterprise
(i.e. those inherited from this user's "ancestor" user profiles in LDAP).
User Authentication plug-in can set a filter to the subscriptions. In this case,
the list of returned subscriptions can be a subset of the subscribed ones.
These names can be used to initialize the serviceName
property
of a Subscription
bean.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String[] getPersonalSubscriptionNames() throws UnknownUserException, NonUniqueUserException
serviceName
property
of a Subscription
bean.
User Authentication plug-in can set a filter to the subscriptions. In this case,
the list of returned subscriptions can be a subset of the personally subscribed ones.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Subscription
,
getSubscriptionNames()
public java.lang.String[] getAvailableSubscriptionNames() throws UnknownUserException, NonUniqueUserException
getSubscriptionNames
method)
minus the subscriptions that are currently suspended and
minus the subscriptions that are not accessible from the user's current location.
These names can be used to initialize the serviceName
property
of a Subscription
bean.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Subscription.isSuspended()
,
getLocationName()
public java.lang.String[] getAvailableServiceNames() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this
bean's userDn
property is logged in more than
once.public java.lang.String[] getActiveSubscriptionNames() throws UnknownUserException, NonUniqueUserException
serviceName
property
of a Subscription
bean.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Subscription.setActive(boolean)
public java.lang.Object getAttribute(java.lang.String attributeName) throws UnknownUserException, NonUniqueUserException
Object
must be cast to the appropriate type. If the attribute is multi-valued, the
returned Object
must be cast to an array of the appropriate type.
java.lang.IllegalStateException
- If this bean's mandatory userIp
or
userDn
property has not been set.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public DhcpPacket getDhcpPacket() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String[] addSubscription(java.lang.String serviceName, java.lang.String userName, java.lang.String password) throws UnknownUserException, UnknownServiceException, ServiceAuthenticationException, SspException, NonUniqueUserException
serviceName
. This method creates a
new subscription entry in SAE's LDAP user directory or revokes
its DELETED attribute if the subscription already existed with
the DELETED attribute marked as true. All configured
subscription authorization plug-ins must authorize the
subscription. If any plug-in rejects the subscription, a
ServiceAuthenticationException will be thrown.
serviceName
- The desired service's name (e.g. "Video
Gold").userName
- The user name passed to the subscription
authorization plugin.password
- The password passed to the subscription
authorization plugin.
java.lang.IllegalArgumentException
- If the userIp
string does not contain a parseable IP address.
UnknownUserException
- If the user specified by
userIp
is not currently logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownServiceException
- If the service specified by
the serviceName
argument is not currently loaded
into SAE.
ServiceAuthenticationException
- If any subscription
plug-in denies the subscription, or if the service
serviceName
is not currently available for
subscription, or if the user is anonymous.
SspException
- If the user with userIp
address is already subscribed to the service
serviceName
or if failed to add the subscription
to its LDAP directory or if failed to revoke the subscription's
DELETED attribute.deleteSubscription(java.lang.String, java.lang.String, java.lang.String)
public java.lang.String[] addSubscription(java.lang.String serviceName, java.lang.String userName, java.lang.String password, java.util.Map attributes) throws UnknownUserException, UnknownServiceException, ServiceAuthenticationException, SspException, NonUniqueUserException
serviceName
. This method creates a
new subscription entry in SAE's LDAP user directory or revokes
its DELETED attribute if the subscription already existed with
the DELETED attribute marked as true. All configured
subscription authorization plug-ins must authorize the
subscription. If any plug-in rejects the subscription, a
ServiceAuthenticationException will be thrown.
serviceName
- The desired service's name (e.g. "Video
Gold").userName
- The user name passed to the subscription
authorization plugin.password
- The password passed to the subscription
authorization plugin.
java.lang.IllegalArgumentException
- If the userIp
string does not contain a parseable IP address.
UnknownUserException
- If the user specified by
userIp
is not currently logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownServiceException
- If the service specified by
the serviceName
argument is not currently loaded
into SAE.
ServiceAuthenticationException
- If any subscription
plug-in denies the subscription, or if the service
serviceName
is not currently available for
subscription, or if the user is anonymous.
SspException
- If the user with userIp
address is already subscribed to the service
serviceName
or if failed to add the subscription
to its LDAP directory or if failed to revoke the subscription's
DELETED attribute.deleteSubscription(java.lang.String, java.lang.String, java.lang.String)
public java.lang.String[] deleteSubscription(java.lang.String serviceName, java.lang.String userName, java.lang.String password) throws UnknownUserException, UnknownServiceException, UnknownSubscriptionException, ServiceAuthenticationException, SspException, NonUniqueUserException
serviceName
. This method marks the
subscription's attribute DELETED as true from SAE's LDAP user
directory.
All configured subscription authorization plug-ins must
authorize the deletion of the subscription. If any plug-in
rejects the deletion, a ServiceAuthenticationException will be
thrown.
userIp
- The user's current IP address (e.g.
"192.168.34.4").serviceName
- The desired service's name (e.g. "Video
Gold").userName
- The user name passed to the subscription
authorization plugin.password
- The password passed to the subscription
authorization plugin.
java.lang.IllegalArgumentException
- If the userIp
string does not contain a parseable IP address.
UnknownUserException
- If the user specified by
userIp
is not currently logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownServiceException
- If the service specified by
the serviceName
argument is not currently loaded
into SAE.
UnknownSubscriptionException
- If the user with
userIp
address is not currently subscribed to the
service serviceName
.
ServiceAuthenticationException
- If any subscription
plug-in denies the subscription deletion, or if the user is anonymous.
SspException
- If failed to mark the subscription's
attribute DELETED as true on its LDAP directory.addSubscription(java.lang.String, java.lang.String, java.lang.String)
public void setSessionTimeout(int timeout) throws UnknownUserException, NonUniqueUserException
timeout
- max length of user session in seconds.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public void updateSessionTimeout(int timeout) throws UnknownUserException, NonUniqueUserException
timeout
is
equal to -1, the session timeout is cancelled.
The new value for the session timeout is not updated on
the E-series router.
timeout
- max length of user session in seconds.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getServiceBundle() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
public java.lang.String getCallingStationId() throws UnknownUserException, NonUniqueUserException
UnknownUserException
NonUniqueUserException
public java.lang.String[] getRadiusClass() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
property is logged in more than once.
NonUniqueUserException
public java.lang.String[] getAttributeNames() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public int getNumConcurrentSessions() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public int getNumConcurrentGroupSessions() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String[] getReplyMessages() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public void updatedScheduleEntry(java.lang.String id, ScheduledTime aScheduleTime, Action[] aActions) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
update the schedule entry in the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public void deleteScheduleEntry(java.lang.String id) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.deleteScheduleEntry(String id)
public java.lang.String[] getScheduleEntryIds() throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public void addScheduleEntry(ScheduleEntry aSE) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is already a schedule entry for the
subscriber for the given date or if there is a failure to
add the schedule entry to the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public void updatedScheduleEntryActions(long date, Action[] aActions) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
update the schedule entry in the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public void deleteScheduleEntry(long date) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.deleteScheduleEntry(String id)
public ScheduleEntry getScheduleEntry(long date) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public ScheduleEntry getScheduleEntry(java.lang.String id) throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
id
- The unique id of the schedule entry.
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public ScheduleEntry[] getScheduleEntries() throws SspException, java.lang.IllegalStateException, UnknownUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.public long[] getScheduleEntryEventDates() throws SspException, java.lang.IllegalStateException, UnknownUserException, NonUniqueUserException
SspException
- If there is no schedule entry for the
subscriber for the given date or if there is a failure to
delete the schedule entry from the LDAP Directory Server.
java.lang.IllegalStateException
- If this bean has not been properly
initialized.
UnknownUserException
- If the user is no longer logged
in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getNasIp() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
public java.lang.String[] getInterfaceAttributeNames() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
public java.util.Map getInterfaceAttributes() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
public java.util.Set getProperties() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.util.Map getPropertyMap() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public boolean login(java.lang.String loginName, java.lang.String password) throws LoginException
loginName
from the SAE's LDAP directory, and assign it to
the user. The new user profile will replace the user's
current user profile. The new user profile is selected by the SAE's
user classification script based on the loginName
provided here.
java.lang.IllegalArgumentException
- If the loginName
string is null or zero-length, or if the password
string is null.
LoginException
- If the login fails for any reason. A login will fail if
an invalid username and/or password are supplied. A login may also fail for other
reasons, such as a network connectivity problem between SAE and the LDAP
directory. (To aid in diagnosing repeated login failures, the LoginException
contains an English language message explaining the failure. This message is not suitable
for presentation to end users on a web page.)public void logout() throws UnknownUserException, SspException
UnknownUserException
- If the user is no longer logged in to SAE.
SspException
- If this operation fails due to an unexpected error condition in SAE or in
an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).public void disconnect() throws UnknownUserException, NonUniqueUserException, UnsupportedException, SspException
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnsupportedException
- If the router driver does not support the disconnect operation.
SspException
- If this operation fails due to an unexpected error condition in SAE or in
an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).public void grantPublicIp(java.lang.String loginName, java.lang.String password) throws UnknownUserException, ServiceAuthenticationException, SspException
loginName
and password
parameters will immediately be sent to
the E-series router, which will authenticate them against a RADIUS server. The E-series requires that the
loginName
contain an "@" character followed by a domain name.
If the authentication succeeds, the
user's 'token' IP address lease will no longer be renewed. Once the 'token' IP address lease expires, the
user will be assigned a new public IP address. Depending on the E-series router's configuration, this
public IP address may come from a pool of IP
addresses that is associated with the domain name found inside the loginName
parameter (i.e. everything after the '@' character),
registerEquipment
method to always assign a public IP address to a client device every time it requests a new IP address
via DHCP.
loginName
- The login name to be authenticated via RADIUS before the new
public IP address is granted (e.g. "jsmith@isp3.com").
Leading and trailing whitespace are automatically trimmed from this String.password
- The clear text password to be authenticated via
RADIUS before the new public IP address is granted.
Leading and trailing whitespace are automatically trimmed from this String.
java.lang.IllegalArgumentException
- If there is no user ID followed by an "@" character followed by a domain name
(e.g. "jsmith@isp3.com") in the loginName
string, or if the password
string is null.
java.lang.IllegalStateException
- If the user specified by this bean is not currently a token DHCP user.
ServiceAuthenticationException
- If authentication of the loginName
and password
fails.
SspException
- If this operation fails due to an unexpected error condition in SAE or in
an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).
This includes the case where the specified login name and password can not be authenticated by
the E-series router.
UnknownUserException
- If the user is not currently logged in to SAE.public void grantPublicIp(java.lang.String loginName, java.lang.String password, DhcpProfile dhcpProfile) throws UnknownUserException, ServiceAuthenticationException, SspException
loginName
and password
parameters
will be authenticated and if authentication was successful the
dhcpProfile
will be used to assign the new address.
registerEquipment
method to always assign a public IP address to a
client device every time it requests a new IP address via DHCP.
loginName
- The login name to be authenticated
before the new public IP address is granted (e.g.
"jsmith@isp3.com"). Leading and trailing whitespace are
automatically trimmed from this String.password
- The clear text password to be
authenticated via RADIUS before the new public IP address is
granted. Leading and trailing whitespace are automatically
trimmed from this String.dhcpProfile
- additional data used to modify the DHCP
offer sent to the user. Note: not all versions of JUNOSe
honor the data contained in the dhcpProfile
,
please check your JUNOSe documenation for details.
ServiceAuthenticationException
- If authentication of
the loginName
and password
fails.
SspException
- If this operation fails due to an
unexpected error condition in SAE or in an external system upon
which SAE depends (e.g. an LDAP directory, a RADIUS
server, an E-series router, etc.). This includes the case where the
specified login name and password can not be authenticated by
the E-series router.
UnknownUserException
- If the user specified by
this bean is not currently logged in to SAE.grantPublicIp(String, String)
,
Ssp.registerEquipment(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void revokePublicIp() throws UnknownUserException, NonUniqueUserException, SspException
UnknownUserException
- If the user specified by this bean is not currently logged in to SAE.
SspException
- If this operation fails due to an unexpected error condition in SAE or in
an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).
NonUniqueUserException
grantPublicIp(java.lang.String, java.lang.String)
public boolean isPppUser() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String toString()
toString
in class java.lang.Object
public net.juniper.smgt.sae.session.UserSession getUserSession() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
- If the user is no longer logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userIp
property or userDn
property is logged in more than once.public static java.util.Set getDeprecatedProperties()
public java.lang.String getSessionHandle() throws UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownUserException
NonUniqueUserException
public java.lang.String getVpnId() throws UnknownUserException, NonUniqueUserException
IllegalStateExeption
- if this bean has not been properly initialized.
UnknownUserException
- if the user is not currently logged in
NonUniqueUserException
- if the user is not uniquely identifiedpublic java.util.Map getLocalQosProfiles() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public void setProperty(java.lang.String aProperty) throws UnknownUserException, NonUniqueUserException
aProperty
- is typically in UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String getFramedIpv6Prefix() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.public java.lang.String[] getDelegatedIpv6Prefix() throws UnknownUserException, NonUniqueUserException
UnknownUserException
- if the User is currently not
logged in.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
|
Core API 7.14 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |