public final class

PolicyUtils

extends Object
java.lang.Object
   ↳ com.sun.security.sasl.util.PolicyUtils

Class Overview

Static class that contains utilities for dealing with Java SASL security policy-related properties.

Summary

Constants
int FORWARD_SECRECY
int NOACTIVE
int NOANONYMOUS
int NODICTIONARY
int NOPLAINTEXT
int PASS_CREDENTIALS
Public Methods
static boolean checkPolicy(int flags, Map props)
Determines whether a mechanism's characteristics, as defined in flags, fits the security policy properties found in props.
static String[] filterMechs(String[] mechs, int[] policies, Map props)
Given a list of mechanisms and their characteristics, select the subset that conforms to the policies defined in props.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int FORWARD_SECRECY

Constant Value: 8 (0x00000008)

public static final int NOACTIVE

Constant Value: 2 (0x00000002)

public static final int NOANONYMOUS

Constant Value: 16 (0x00000010)

public static final int NODICTIONARY

Constant Value: 4 (0x00000004)

public static final int NOPLAINTEXT

Constant Value: 1 (0x00000001)

public static final int PASS_CREDENTIALS

Constant Value: 512 (0x00000200)

Public Methods

public static boolean checkPolicy (int flags, Map props)

Determines whether a mechanism's characteristics, as defined in flags, fits the security policy properties found in props.

Parameters
flags The mechanism's security characteristics
props The security policy properties to check
Returns
  • true if passes; false if fails

public static String[] filterMechs (String[] mechs, int[] policies, Map props)

Given a list of mechanisms and their characteristics, select the subset that conforms to the policies defined in props. Useful for SaslXXXFactory.getMechanismNames(props) implementations.