Comments (5)
@DibbsZA sorry, but I don't have a site yet. Anyway, what kind of problem do you have? Write some errors or other info so that I can better understand.
from angular-digest-auth.
Hi,
Thanks for your reply.
I was hoping to see a tested example of a full implementation in code so I
could compare with my interpretation of the docs.
Specifically I am struggling with:
-
Login/Logout Configuration -
"Create the services to sign in and sign out in order to simulate the
login and the logout in your app."Are these Angular Services to which you refer?
Do the URLs point to templates in the app which bind to Controllers and
thereby these defined services?
If so, do these services make any actual (simulate?) calls to the
backend REST endpoint?
If so, should I use $http or $resource in their function to make calls
to the backend?
Do I make the calls to the standard data request endpoint or should I
implement a specific Login/Logout URI? -
Header
"You should define a custom header in the server side in order to avoid
the browser form and use your custom login form."
What if the backend-service is not mine to customise? -
Usage
"dgAuthService.start();"
After calling this function, how does the sign-in process know what URI
to call to attempt the login?
Where do I define the redirect to the login form or should I open the
app already on this form?
I would really appreciate any feedback on these points if you wouldn't mind.
Thanks
Gary
On Wed, Apr 23, 2014 at 12:36 AM, tafax [email protected] wrote:
@DibbsZA https://github.com/DibbsZA sorry, but I don't have a site yet.
Anyway, what kind of problem do you have? Write some errors or other info
so that I can better understand.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-41104470
.
from angular-digest-auth.
@DibbsZA I'll try to explain better than I did(I think some of your questions has already a response in the README).
The point is: to use the service(dgAuthService
) you have to be able to change the header name with a custom name. This is needed because the default header name, in the response, for the Digest Authentication(DA) is handled by the browser and the browser itself displays a form before the JS is able to intercept the request. So, if you don't have this ability, probably the library is not so useful for you.
Anyway, I don't know a way to solve this problem in a browser, but if you know something that can work, you can do a pull request. I like the contributors 👍
Anyway, when I speak about service I mean web service. You can use REST or some other technologies, but the response should be a valid JSON. The library only works with JSON. If you don't have this web services, you should implement them. If you take a look in the "Login and logout" section in the README you can see how to configure the requests. The object, specified both for login and for logout request, is the same object that you would specify if you called the $http service directly. You can customize the requests as you want.
When you call start
in the dgAuthService
the service calls the login to know the header information(without a valid header specified by the client, the server should respond with the information to create a valid one in the client side). If it is needed, it asks for the credentials and then it uses all information to create a valid header, afterwards it calls again the login URL. You don't have to handle this workflow, the library does this for you.
By looking in the "Callbacks" section, you should see how to handle the behaviors during the workflow that I mentioned above.
During the login:
successful
function: you can redirect the user to your home page, for example. The function is called when the login web service responds with the code 200. This should be so when the credentials of the user are correct.required
function: it is called when the credentials are needed, so you can display your custom form to do the login.error
andlimit
functions: they are called when an error occurs and when the request limit is exceeded respectively.
With your custom functions you can handle the behaviors to fit your purpose.
I hope this description could be useful for you. Anyway, I think the point is only the custom header name. You should have the ability to specify it.
Let me know.
from angular-digest-auth.
Closed for inactivity
from angular-digest-auth.
Hi guys. I'll post question here. I'm really confused.
I have a JBoss server with it's standard Digest Authenticator that is slightly updated to use custom header. No other changes.
I've configured angular-digest-auth. And trying to perform sigin previously setting the user name and password.
But what I see in network monitor, is that nonce sent by server and responded by library doesn't match. But they should, aren't they? So the server always responds with 401 without proceeding with authentication. (but it's standard jboss authenticator with only the custom header).
Do You have any ideas? I really, really confused. And hope You can give some tips on this topic to resolve this strange thing.
from angular-digest-auth.
Related Issues (20)
- dgAuthService.start() and POST without username and password data HOT 2
- How to use a controller method to authenticate? HOT 3
- Example app ? HOT 11
- TypeError: header.split is not a function HOT 2
- Support npm installs HOT 1
- Can this module support a standard http-digest exchange which uses WWW-Authenticate? HOT 2
- angular-cookies dependency: is it really used?
- tests seem to fail? HOT 2
- WWW-Authenticate challenge may be parsed incorrectly HOT 1
- authIdentity.get() is not always the information obtained from the signin URL
- Logout keeps credentials
- Is this module still being supported?
- Error in value pattern
- Cross Domain calls not working, every time 401 only getting even though Authorization header is added
- Error when start() method is called HOT 4
- This doesn't seem to follow the protocol for http digest or am I missing something? HOT 1
- using scope in callback HOT 2
- Calling Post on Start Up HOT 1
- Documentation could be better. HOT 2
- Storage of username and password in local storage is insecure.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-digest-auth.