APIdia Launch Partner
Top Description Fields Constructors Methods
javax.security.sasl

public Class AuthorizeCallback

extends Object
implements Callback, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.security.auth.callback.Callback
Imports
java.io.Serial, javax.security.auth.callback.Callback

This callback is used by SaslServer to determine whether one entity (identified by an authenticated authentication id) can act on behalf of another entity (identified by an authorization id).
Authors
Rosanna Lee, Rob Weltman
Since
1.5

Field Summary

Modifier and TypeField and Description
private String
authenticationID

The (authenticated) authentication id to check.

private String
authorizationID

The authorization id to check.

private boolean
authorized

A flag indicating whether the authentication id is allowed to act on behalf of the authorization id.

private String
authorizedID

The id of the authorized entity.

private static final long

Constructor Summary

AccessConstructor and Description
public
AuthorizeCallback(String
The (authenticated) authentication id.
authnID
,
String
The authorization id.
authzID
)

Constructs an instance of AuthorizeCallback.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The authentication id to check.
getAuthenticationID
()

Returns the authentication id to check.

public String

Returns:

The authentication id to check.
getAuthorizationID
()

Returns the authorization id to check.

public String

Returns:

The id of the authorized user. null means the authorization failed.
getAuthorizedID
()

Returns the id of the authorized user.

public boolean

Returns:

true if authorization is allowed; false otherwise
isAuthorized
()

Determines whether the authentication id is allowed to act on behalf of the authorization id.

public void
setAuthorized(boolean
true if authorization is allowed; false otherwise
ok
)

Sets whether the authorization is allowed.

public void
setAuthorizedID(String
The id of the authorized user.
id
)

Sets the id of the authorized entity.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authenticationIDback to summary
private String authenticationID

The (authenticated) authentication id to check.

authorizationIDback to summary
private String authorizationID

The authorization id to check.

authorizedback to summary
private boolean authorized

A flag indicating whether the authentication id is allowed to act on behalf of the authorization id.

authorizedIDback to summary
private String authorizedID

The id of the authorized entity. If null, the id of the authorized entity is authorizationID.

serialVersionUIDback to summary
private static final long serialVersionUID
Annotations
@Serial

Constructor Detail

AuthorizeCallbackback to summary
public AuthorizeCallback(String authnID, String authzID)

Constructs an instance of AuthorizeCallback.

Parameters
authnID:String

The (authenticated) authentication id.

authzID:String

The authorization id.

Method Detail

getAuthenticationIDback to summary
public String getAuthenticationID()

Returns the authentication id to check.

Returns:String

The authentication id to check.

getAuthorizationIDback to summary
public String getAuthorizationID()

Returns the authorization id to check.

Returns:String

The authentication id to check.

getAuthorizedIDback to summary
public String getAuthorizedID()

Returns the id of the authorized user.

Returns:String

The id of the authorized user. null means the authorization failed.

See Also
setAuthorized(boolean), setAuthorizedID(java.lang.String)
isAuthorizedback to summary
public boolean isAuthorized()

Determines whether the authentication id is allowed to act on behalf of the authorization id.

Returns:boolean

true if authorization is allowed; false otherwise

See Also
setAuthorized(boolean), getAuthorizedID()
setAuthorizedback to summary
public void setAuthorized(boolean ok)

Sets whether the authorization is allowed.

Parameters
ok:boolean

true if authorization is allowed; false otherwise

See Also
isAuthorized, setAuthorizedID(java.lang.String)
setAuthorizedIDback to summary
public void setAuthorizedID(String id)

Sets the id of the authorized entity. Called by handler only when the id is different from getAuthorizationID(). For example, the id might need to be canonicalized for the environment in which it will be used.

Parameters
id:String

The id of the authorized user.

See Also
setAuthorized(boolean), getAuthorizedID