+/*
+ * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package edu.internet2.middleware.shibboleth.idp.authn;
import javax.servlet.http.HttpServlet;
+import edu.internet2.middleware.shibboleth.idp.session.SessionManager;
+
/**
* Manager responsible for handling an authentication requests.
*/
public class AuthenticationManager extends HttpServlet {
+ /** Session manager to be used by this servlet */
+ private SessionManager sessionMgr;
+
+ /**
+ * Gets the session manager to be used by this servlet.
+ *
+ * @return session manager to be used by this servlet
+ */
+ public SessionManager getSessionManager(){
+ return sessionMgr;
+ }
+
+ /**
+ * Sets the session manager to be used by this servlet.
+ *
+ * @param manager session manager to be used by this servlet
+ */
+ public void setSessionManager(SessionManager manager){
+ sessionMgr = manager;
+ }
}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package edu.internet2.middleware.shibboleth.idp.session;
+
+import org.joda.time.DateTime;
+
+/**
+ * Information about an authentication method employed by a user.
+ */
+public interface AuthenticationMethodInformation {
+
+ /**
+ * Gets the unique identifier for the authentication method.
+ *
+ * @return unique identifier for the authentication method
+ */
+ public String getAuthenticationMethod();
+
+ /**
+ * Gets the time the user authenticated with this member.
+ *
+ * @return time the user authenticated with this member
+ */
+ public DateTime getAuthenticationInstance();
+
+ /**
+ * Gets the duration of this authentication method.
+ *
+ * @return duration of this authentication method
+ */
+ public long getAuthenticationDuration();
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package edu.internet2.middleware.shibboleth.idp.session;
+
+import org.joda.time.DateTime;
+import org.opensaml.saml2.core.NameID;
+
+/**
+ * Information about a service a user has logged in to.
+ */
+public interface ServiceInformation {
+
+ /**
+ * Gets the unique identifier for the service.
+ *
+ * @return unique identifier for the service
+ */
+ public String getEntityID();
+
+ /**
+ * Gets the time the user authenticated to the service.
+ *
+ * @return time the user authenticated to the service
+ */
+ public DateTime getAuthenticationInstance();
+
+ /**
+ * Gets the authentication method used to log into the service.
+ *
+ * @return authentication method used to log into the service
+ */
+ public AuthenticationMethodInformation getAuthenticationMethod();
+
+ /**
+ * Gets the NameID used for the subject/user with this service.
+ *
+ * @return NameID used for the subject/user with this service
+ */
+ public NameID getSubjectNameID();
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package edu.internet2.middleware.shibboleth.idp.session;
+
+import java.util.List;
+
+import org.joda.time.DateTime;
+
+/**
+ * Session information for user logged into the IdP.
+ */
+public interface Session {
+
+ /**
+ * Gets the unique identifier of the session.
+ *
+ * @return unique identifier of the session
+ */
+ public String getSessionID();
+
+ /**
+ * Gets the principal ID of the user.
+ *
+ * @return principal ID of the user
+ */
+ public String getPrincipalID();
+
+ /**
+ * Gets the time of the last activity from the user.
+ *
+ * @return time of the last activity from the user
+ */
+ public DateTime getLastActivityInstance();
+
+ /**
+ * Gets the methods by which the user has authenticated to the IdP.
+ *
+ * @return methods by which the user has authenticated to the IdP
+ */
+ public List<AuthenticationMethodInformation> getAuthenticationMethods();
+
+ /**
+ * Gets the services the user has logged in to.
+ *
+ * @return services the user has logged in to
+ */
+ public List<ServiceInformation> getServicesInformation();
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package edu.internet2.middleware.shibboleth.idp.session;
+
+/**
+ * Session managers are responsible for creating, managing, and destroying Shibboleth IdP sessions.
+ */
+public interface SessionManager {
+
+ /**
+ * Creates a Shibboleth session.
+ *
+ * @return a Shibboleth session
+ */
+ public Session createSession();
+
+ /**
+ * Gets the user's session based on session's ID.
+ *
+ * @param sessionID the ID of the session
+ *
+ * @return the session
+ */
+ public Session getSession(String sessionID);
+
+ /**
+ * Destroys the session.
+ *
+ * @param sessionID the ID of the session.
+ */
+ public void destroySession(String sessionID);
+}
\ No newline at end of file